Index.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. namespace Dotdigitalgroup\Email\Controller\Adminhtml\Cron;
  3. class Index extends \Magento\Backend\App\Action
  4. {
  5. /**
  6. * Authorization level of a basic admin session
  7. *
  8. * @see _isAllowed()
  9. */
  10. const ADMIN_RESOURCE = 'Dotdigitalgroup_Email::cron';
  11. /**
  12. * @var \Magento\Framework\View\Result\PageFactory
  13. */
  14. private $resultPageFactory;
  15. /**
  16. * Index constructor.
  17. *
  18. * @param \Magento\Backend\App\Action\Context $context
  19. * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
  20. */
  21. public function __construct(
  22. \Magento\Backend\App\Action\Context $context,
  23. \Magento\Framework\View\Result\PageFactory $resultPageFactory
  24. ) {
  25. $this->resultPageFactory = $resultPageFactory;
  26. parent::__construct($context);
  27. }
  28. /**
  29. * @return \Magento\Backend\Model\View\Result\Page
  30. */
  31. public function execute()
  32. {
  33. //Call page factory to render layout and page content
  34. /** @var \Magento\Backend\Model\View\Result\Page $resultPage */
  35. $resultPage = $this->resultPageFactory->create();
  36. //Set the menu which will be active for this page
  37. $resultPage->setActiveMenu('Dotdigitalgroup_Email::cron');
  38. //Set the header title of grid
  39. $resultPage->getConfig()->getTitle()->prepend(__('Cron Tasks'));
  40. $resultPage->addBreadcrumb(__('Report'), __('Report'));
  41. $resultPage->addBreadcrumb(__('Cron'), __('Cron'));
  42. return $resultPage;
  43. }
  44. }