NewAction.php 1.4 KB

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