Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Index.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface;
10 
11 class Index extends \Magento\Cms\Controller\Adminhtml\Block implements HttpGetActionInterface
12 {
16  protected $resultPageFactory;
17 
23  public function __construct(
24  \Magento\Backend\App\Action\Context $context,
25  \Magento\Framework\Registry $coreRegistry,
26  \Magento\Framework\View\Result\PageFactory $resultPageFactory
27  ) {
28  $this->resultPageFactory = $resultPageFactory;
29  parent::__construct($context, $coreRegistry);
30  }
31 
37  public function execute()
38  {
40  $resultPage = $this->resultPageFactory->create();
41  $this->initPage($resultPage)->getConfig()->getTitle()->prepend(__('Blocks'));
42 
43  $dataPersistor = $this->_objectManager->get(\Magento\Framework\App\Request\DataPersistorInterface::class);
44  $dataPersistor->clear('cms_block');
45 
46  return $resultPage;
47  }
48 }
__construct(\Magento\Backend\App\Action\Context $context, \Magento\Framework\Registry $coreRegistry, \Magento\Framework\View\Result\PageFactory $resultPageFactory)
Definition: Index.php:23
__()
Definition: __.php:13