AddressListingPageLoadedEvent example

$criteria = (new Criteria())->addSorting(new FieldSorting('firstName', FieldSorting::ASCENDING));

        $page->setAddresses($this->listAddressRoute->load($criteria$salesChannelContext$customer)->getAddressCollection());

        $page->setCart($this->cartService->getCart($salesChannelContext->getToken()$salesChannelContext));

        $page->setAddress(
            $page->getAddresses()->get($request->get('addressId'))
        );

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

        return $page;
    }

    /** * @throws InconsistentCriteriaIdsException */
    private function getSalutations(SalesChannelContext $context): SalutationCollection
    {
        $salutations = $this->salutationRoute->load(new Request()$contextnew Criteria())->getSalutations();

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