CurrencyRouteRequestEvent example


    public function load(Request $request, SalesChannelContext $context): HeaderPagelet
    {
        $salesChannel = $context->getSalesChannel();
        $navigationId = $request->get('navigationId', $salesChannel->getNavigationCategoryId());

        if (!$navigationId) {
            throw RoutingException::missingRequestParameter('navigationId');
        }

        $languages = $this->getLanguages($context$request);
        $event = new CurrencyRouteRequestEvent($requestnew Request()$context);
        $this->eventDispatcher->dispatch($event);

        $navigation = $this->navigationLoader->load(
            (string) $navigationId,
            $context,
            $salesChannel->getNavigationCategoryId(),
            $salesChannel->getNavigationCategoryDepth()
        );

        $criteria = new Criteria();
        $criteria->setTitle('header::currencies');

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