NewAction.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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\Configuration\Carrier;
  6. use Magento\Framework\Controller\ResultFactory;
  7. use Magento\Backend\App\Action;
  8. /**
  9. * Temando Available Carriers Page
  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::carriers';
  20. /**
  21. * @return \Magento\Framework\Controller\ResultInterface
  22. */
  23. public function execute()
  24. {
  25. /** @var \Magento\Backend\Model\View\Result\Page $resultPage */
  26. $resultPage = $this->resultFactory->create(ResultFactory::TYPE_PAGE);
  27. $resultPage->setActiveMenu('Temando_Shipping::carriers');
  28. $resultPage->getConfig()->getTitle()->prepend(__('Carriers'));
  29. $resultPage->getConfig()->getTitle()->prepend(__('Shipping Partners'));
  30. $resultPage->addBreadcrumb(__('Carriers'), __('Carriers'), $this->getUrl('temando/configuration_carrier'));
  31. $resultPage->addBreadcrumb(__('Shipping Partners'), __('Shipping Partners'));
  32. return $resultPage;
  33. }
  34. }