Index.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Theme\Controller\Adminhtml\Design\Config;
  7. use Magento\Backend\App\Action;
  8. use Magento\Backend\App\Action\Context;
  9. use Magento\Framework\View\Result\PageFactory;
  10. /**
  11. * Design Config Settings index page action controller
  12. */
  13. class Index extends Action
  14. {
  15. /**
  16. * @var PageFactory
  17. */
  18. protected $resultPageFactory;
  19. /**
  20. * @param Context $context
  21. * @param PageFactory $resultPageFactory
  22. */
  23. public function __construct(
  24. Context $context,
  25. PageFactory $resultPageFactory
  26. ) {
  27. parent::__construct($context);
  28. $this->resultPageFactory = $resultPageFactory;
  29. }
  30. /**
  31. * Design config list action
  32. *
  33. * @return \Magento\Backend\Model\View\Result\Page
  34. */
  35. public function execute()
  36. {
  37. /** @var \Magento\Backend\Model\View\Result\Page $resultPage */
  38. $resultPage = $this->resultPageFactory->create();
  39. $resultPage->setActiveMenu('Magento_Theme::design_config');
  40. $resultPage->getConfig()->getTitle()->prepend(__('Design Configuration'));
  41. return $resultPage;
  42. }
  43. /**
  44. * Theme access rights checking
  45. *
  46. * @return bool
  47. */
  48. protected function _isAllowed()
  49. {
  50. return $this->_authorization->isAllowed('Magento_Config::config_design');
  51. }
  52. }