$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>
*/