fetchCategoriesOfProducts example

ShopContextInterface $context
    ) {
        return $this->getFacet($facet$reverted$criteria$context);
    }

    private function getFacet(
        CategoryFacet $facet,
        Criteria $reverted,
        Criteria $criteria,
        ShopContextInterface $context
    ): ?TreeFacetResult {
        $ids = $this->fetchCategoriesOfProducts($reverted$context);

        if (empty($ids)) {
            return null;
        }

        $ids = $this->filterSystemCategories($ids$context);

        $ids = $this->categoryDepthService->get(
            $context->getShop()->getCategory(),
            $facet->getDepth(),
            $ids
        );
Home | Imprint | This part of the site doesn't use cookies.