1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/**
* Refer to LICENSE.txt distributed with the Temando Shipping module for notice of license
*/
namespace Temando\Shipping\Controller\Adminhtml\Dispatch;
use Magento\Framework\Controller\ResultFactory;
use Magento\Backend\App\Action;
/**
* Temando Add Dispatch Action
*
* @package Temando\Shipping\Controller
* @author Christoph Aßmann <christoph.assmann@netresearch.de>
* @author Sebastian Ertner <sebastian.ertner@netresearch.de>
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* @link http://www.temando.com/
*/
class NewAction extends Action
{
const ADMIN_RESOURCE = 'Temando_Shipping::dispatches';
/**
* Render template.
*
* @return \Magento\Backend\Model\View\Result\Page
*/
public function execute()
{
/** @var \Magento\Backend\Model\View\Result\Page $resultPage */
$resultPage = $this->resultFactory->create(ResultFactory::TYPE_PAGE);
$resultPage->setActiveMenu('Temando_Shipping::dispatches');
$resultPage->getConfig()->getTitle()->prepend(__('Dispatches'));
$resultPage->getConfig()->getTitle()->prepend(__('Create New Dispatch'));
$resultPage->addBreadcrumb(__('Dispatches'), __('Dispatches'), $this->getUrl('temando/dispatch'));
$resultPage->addBreadcrumb(__('Create New Dispatch'), __('Create New Dispatch'));
return $resultPage;
}
}