buildFacetResult example



        $ids = $this->filterSystemCategories($ids$context);
        $ids = $this->categoryDepthService->get(
            $context->getShop()->getCategory(),
            $categoryFacet->getDepth(),
            $ids
        );

        $categories = $this->categoryService->getList($ids$context);

        $facet = $this->categoryTreeFacetResultBuilder->buildFacetResult(
            $categories,
            $this->getFilteredIds($criteria),
            $context->getShop()->getCategory()->getId(),
            $categoryFacet
        );

        if (!$facet instanceof FacetResultInterface) {
            return;
        }
        $result->addFacet($facet);
    }

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

        $ids = $this->categoryDepthService->get(
            $context->getShop()->getCategory(),
            $facet->getDepth(),
            $ids
        );

        $categories = $this->categoryService->getList($ids$context);

        return $this->categoryTreeFacetResultBuilder->buildFacetResult(
            $categories,
            $this->getFilteredIds($criteria),
            $context->getShop()->getCategory()->getId(),
            $facet
        );
    }

    /** * @return int[] */
    private function fetchCategoriesOfProducts(Criteria $reverted, ShopContextInterface $context): array
    {
Home | Imprint | This part of the site doesn't use cookies.