Index.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\AsynchronousOperations\Controller\Adminhtml\Index;
  7. class Index extends \Magento\Backend\App\Action
  8. {
  9. /**
  10. * Authorization level of a basic admin session
  11. *
  12. * @see _isAllowed()
  13. */
  14. const ADMIN_RESOURCE = 'Magento_Logging::system_magento_logging_bulk_operations';
  15. /**
  16. * @var \Magento\Framework\View\Result\PageFactory
  17. */
  18. private $resultPageFactory;
  19. /**
  20. * @var string
  21. */
  22. private $menuId;
  23. /**
  24. * Details constructor.
  25. * @param \Magento\Backend\App\Action\Context $context
  26. * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
  27. * @param string $menuId
  28. */
  29. public function __construct(
  30. \Magento\Backend\App\Action\Context $context,
  31. \Magento\Framework\View\Result\PageFactory $resultPageFactory,
  32. $menuId = 'Magento_AsynchronousOperations::system_magento_logging_bulk_operations'
  33. ) {
  34. $this->resultPageFactory = $resultPageFactory;
  35. $this->menuId = $menuId;
  36. parent::__construct($context);
  37. }
  38. /**
  39. * @inheritDoc
  40. */
  41. protected function _isAllowed()
  42. {
  43. return parent::_isAllowed();
  44. }
  45. /**
  46. * Bulk list action
  47. *
  48. * @return \Magento\Framework\View\Result\Page
  49. */
  50. public function execute()
  51. {
  52. $resultPage = $this->resultPageFactory->create();
  53. $resultPage->initLayout();
  54. $this->_setActiveMenu($this->menuId);
  55. $resultPage->getConfig()->getTitle()->prepend(__('Bulk Actions Log'));
  56. return $resultPage;
  57. }
  58. }