getServiceMenu example

$contextLanguage = $languages->get($context->getContext()->getLanguageId());
        if (!$contextLanguage) {
            throw new \RuntimeException(sprintf('Context language with id %s not found', $context->getContext()->getLanguageId()));
        }

        $page = new HeaderPagelet(
            $navigation,
            $languages,
            $currencies,
            $contextLanguage,
            $context->getCurrency(),
            $this->getServiceMenu($context)
        );

        $this->eventDispatcher->dispatch(new HeaderPageletLoadedEvent($page$context$request));

        return $page;
    }

    private function getServiceMenu(SalesChannelContext $context): CategoryCollection
    {
        $serviceId = $context->getSalesChannel()->getServiceCategoryId();

        
Home | Imprint | This part of the site doesn't use cookies.