AddressEditorModalStruct example

return $this->forwardToRoute(
            'frontend.account.address.edit.page',
            ['formViolations' => $formViolations],
            ['addressId' => $address->get('id')]
        );
    }

    #[Route(path: '/widgets/account/address-book', name: 'frontend.account.addressbook', options: ['seo' => true], defaults: ['XmlHttpRequest' => true, '_loginRequired' => true, '_loginRequiredAllowGuest' => true], methods: ['POST'])]     public function addressBook(Request $request, RequestDataBag $dataBag, SalesChannelContext $context, CustomerEntity $customer): Response
    {
        $viewData = new AddressEditorModalStruct();
        $params = [];

        try {
            $page = $this->addressListingPageLoader->load($request$context$customer);
            $this->hook(new AddressBookWidgetLoadedHook($page$context));
            $viewData->setPage($page);

            $this->handleChangeableAddresses($viewData$dataBag$context$customer);
            $this->handleAddressCreation($viewData$dataBag$context$customer);
            $this->handleAddressSelection($viewData$dataBag$context$customer);
            $this->handleCustomerVatIds($dataBag$context$customer);
        }
Home | Imprint | This part of the site doesn't use cookies.