Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Add.php
Go to the documentation of this file.
1 <?php
8 
10 
12 {
18  public function execute()
19  {
20  $this->_coreRegistry->register(
22  $this->_objectManager->get(\Magento\Backend\Model\Session::class)->getFormData(true)
23  );
24 
25  $resultPage = $this->initResultPage();
26  $layout = $resultPage->getLayout();
27  $toolbarSaveBlock = $layout->createBlock(\Magento\Tax\Block\Adminhtml\Rate\Toolbar\Save::class)
28  ->assign('header', __('Add New Tax Rate'))
29  ->assign('form', $layout->createBlock(\Magento\Tax\Block\Adminhtml\Rate\Form::class, 'tax_rate_form'));
30 
31  $resultPage->addBreadcrumb(__('Manage Tax Rates'), __('Manage Tax Rates'), $this->getUrl('tax/rate'))
32  ->addBreadcrumb(__('New Tax Rate'), __('New Tax Rate'))
33  ->addContent($toolbarSaveBlock);
34 
35  $resultPage->getConfig()->getTitle()->prepend(__('Tax Zones and Rates'));
36  $resultPage->getConfig()->getTitle()->prepend(__('New Tax Rate'));
37  return $resultPage;
38  }
39 }
__()
Definition: __.php:13