getFilteredIds example

$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
    {
        $query = $this->queryBuilderFactory->createQuery($reverted$context);
        
$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);
    }

    /** * @param array<int> $ids * * @return array<int> */
Home | Imprint | This part of the site doesn't use cookies.