CodeExplorer CheckoutRegisterPageLoadedEvent example
$page->
setCountries($this->
getCountries($salesChannelContext));
$page->
setCart($this->cartService->
getCart($salesChannelContext->
getToken(),
$salesChannelContext));
$page->
setSalutations($this->
getSalutations($salesChannelContext));
$addressId =
$request->attributes->
get('addressId'
);
if ($addressId) { $address =
$this->
getById((string) $addressId,
$salesChannelContext);
$page->
setAddress($address);
} $this->eventDispatcher->
dispatch( new CheckoutRegisterPageLoadedEvent($page,
$salesChannelContext,
$request) );
return $page;
} private function getById(string
$addressId, SalesChannelContext
$context): CustomerAddressEntity
{ if (!Uuid::
isValid($addressId)) { throw new InvalidUuidException($addressId);
}