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 
14 class Index extends \Magento\EncryptionKey\Controller\Adminhtml\Crypt\Key implements HttpGetActionInterface
15 {
21  public function execute()
22  {
24  $writer = $this->_objectManager->get(\Magento\Framework\App\DeploymentConfig\Writer::class);
25  if (!$writer->checkIfWritable()) {
26  $this->messageManager->addError(__('Deployment configuration file is not writable.'));
27  }
28 
29  $this->_view->loadLayout();
30  $this->_setActiveMenu('Magento_EncryptionKey::system_crypt_key');
31  $this->_view->getPage()->getConfig()->getTitle()->prepend(__('Encryption Key'));
32 
33  if (($formBlock = $this->_view->getLayout()->getBlock('crypt.key.form')) &&
34  ($data = $this->_objectManager->get(\Magento\Backend\Model\Session::class)->getFormData(true))) {
35  /* @var \Magento\EncryptionKey\Block\Adminhtml\Crypt\Key\Form $formBlock */
36  $formBlock->setFormData($data);
37  }
38 
39  $this->_view->renderLayout();
40  }
41 }
__()
Definition: __.php:13