AccountProfilePageLoadedEvent example

$page = $this->genericLoader->load($request$salesChannelContext);

        $page = AccountProfilePage::createFrom($page);

        if ($page->getMetaInformation()) {
            $page->getMetaInformation()->setRobots('noindex,follow');
        }

        $page->setSalutations($this->getSalutations($salesChannelContext$request));

        $this->eventDispatcher->dispatch(
            new AccountProfilePageLoadedEvent($page$salesChannelContext$request)
        );

        return $page;
    }

    private function getSalutations(SalesChannelContext $context, Request $request): SalutationCollection
    {
        $event = new SalutationRouteRequestEvent($requestnew Request()$contextnew Criteria());
        $this->eventDispatcher->dispatch($event);

        $salutations = $this->salutationRoute
            
Home | Imprint | This part of the site doesn't use cookies.