private function fetchStreamListing(int
$categoryId, int
$productStreamId): ProductSearchResult
{ $context =
$this->container->
get(ContextServiceInterface::
class)->
getShopContext();
$criteria =
$this->container->
get(CriteriaFactoryInterface::
class)->
createCriteria($this->
Request(),
$context);
$streamRepository =
$this->container->
get(Repository::
class);
$streamRepository->
prepareCriteria($criteria,
$productStreamId);
$facets =
$this->container->
get(CustomFacetServiceInterface::
class)->
getFacetsOfCategories([$categoryId],
$context);
$facets =
$facets[$categoryId];
foreach ($facets as $facet) { $customFacet =
$facet->
getFacet();
if ($customFacet instanceof FacetInterface
) { $criteria->
addFacet($customFacet);
} } $facetFilter =
$this->container->
get('shopware_product_stream.facet_filter'
);
$facetFilter->
add($criteria);