Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
NewShipping.php
Go to the documentation of this file.
1 <?php
8 
9 class NewShipping extends \Magento\Multishipping\Controller\Checkout\Address
10 {
16  public function execute()
17  {
18  $this->_getState()->setActiveStep(
20  );
21  $this->_view->loadLayout();
22  if ($addressForm = $this->_view->getLayout()->getBlock('customer_address_edit')) {
23  $addressForm->setTitle(
24  __('Create Shipping Address')
25  )->setSuccessUrl(
26  $this->_url->getUrl('*/*/shippingSaved')
27  )->setErrorUrl(
28  $this->_url->getUrl('*/*/*')
29  );
30 
31  $this->_view->getPage()->getConfig()->getTitle()->set(
32  $addressForm->getTitle() . ' - ' . $this->_view->getPage()->getConfig()->getTitle()->getDefault()
33  );
34 
35  if ($this->_getCheckout()->getCustomerDefaultShippingAddress()) {
36  $addressForm->setBackUrl($this->_url->getUrl('*/checkout/addresses'));
37  } else {
38  $addressForm->setBackUrl($this->_url->getUrl('*/cart/'));
39  }
40  }
41  $this->_view->renderLayout();
42  }
43 }
__()
Definition: __.php:13