getSalesChannelFilter example

$criteria->setTitle('breadcrumb-builder');
        $criteria->setLimit(1);
        $criteria->addFilter(new EqualsFilter('active', true));

        if (!empty($categoryIds)) {
            $criteria->setIds($categoryIds);
        } else {
            $criteria->addFilter(new EqualsAnyFilter('productStream.id', $productStreamIds));
            $criteria->addFilter(new EqualsFilter('productAssignmentType', CategoryDefinition::PRODUCT_ASSIGNMENT_TYPE_PRODUCT_STREAM));
        }

        $criteria->addFilter($this->getSalesChannelFilter($context));

        $categories = $this->categoryRepository->search($criteria$context->getContext());

        if ($categories->count() > 0) {
            return $categories->first();
        }

        return null;
    }

    private function getSalesChannelFilter(SalesChannelContext $context): MultiFilter
    {
Home | Imprint | This part of the site doesn't use cookies.