Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Address.php
Go to the documentation of this file.
1 <?php
8 
10 {
16  const ADMIN_RESOURCE = 'Magento_Sales::actions_edit';
17 
23  public function execute()
24  {
25  $addressId = $this->getRequest()->getParam('address_id');
26  $address = $this->_objectManager->create(\Magento\Sales\Model\Order\Address::class)->load($addressId);
27  if ($address->getId()) {
28  $this->_coreRegistry->register('order_address', $address);
29  $resultPage = $this->resultPageFactory->create();
30  // Do not display VAT validation button on edit order address form
31  $addressFormContainer = $resultPage->getLayout()->getBlock('sales_order_address.form.container');
32  if ($addressFormContainer) {
33  $addressFormContainer->getChildBlock('form')->setDisplayVatValidationButton(false);
34  }
35 
36  return $resultPage;
37  } else {
38  return $this->resultRedirectFactory->create()->setPath('sales/*/');
39  }
40  }
41 }
$address
Definition: customer.php:38