123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- namespace Magento\Cms\Controller\Adminhtml\Page;
- use Magento\Framework\App\Action\HttpGetActionInterface;
- use Magento\Backend\App\Action\Context;
- use Magento\Framework\View\Result\PageFactory;
- /**
- * Index action.
- */
- class Index extends \Magento\Backend\App\Action implements HttpGetActionInterface
- {
- /**
- * Authorization level of a basic admin session
- *
- * @see _isAllowed()
- */
- const ADMIN_RESOURCE = 'Magento_Cms::page';
- /**
- * @var PageFactory
- */
- protected $resultPageFactory;
- /**
- * @param Context $context
- * @param PageFactory $resultPageFactory
- */
- public function __construct(
- Context $context,
- PageFactory $resultPageFactory
- ) {
- parent::__construct($context);
- $this->resultPageFactory = $resultPageFactory;
- }
- /**
- * Index action
- *
- * @return \Magento\Backend\Model\View\Result\Page
- */
- public function execute()
- {
- /** @var \Magento\Backend\Model\View\Result\Page $resultPage */
- $resultPage = $this->resultPageFactory->create();
- $resultPage->setActiveMenu('Magento_Cms::cms_page');
- $resultPage->addBreadcrumb(__('CMS'), __('CMS'));
- $resultPage->addBreadcrumb(__('Manage Pages'), __('Manage Pages'));
- $resultPage->getConfig()->getTitle()->prepend(__('Pages'));
- $dataPersistor = $this->_objectManager->get(\Magento\Framework\App\Request\DataPersistorInterface::class);
- $dataPersistor->clear('cms_page');
- return $resultPage;
- }
- }
|