_objectManager->get(\Magento\Framework\App\DeploymentConfig\Writer::class); if (!$writer->checkIfWritable()) { $this->messageManager->addError(__('Deployment configuration file is not writable.')); } $this->_view->loadLayout(); $this->_setActiveMenu('Magento_EncryptionKey::system_crypt_key'); $this->_view->getPage()->getConfig()->getTitle()->prepend(__('Encryption Key')); if (($formBlock = $this->_view->getLayout()->getBlock('crypt.key.form')) && ($data = $this->_objectManager->get(\Magento\Backend\Model\Session::class)->getFormData(true))) { /* @var \Magento\EncryptionKey\Block\Adminhtml\Crypt\Key\Form $formBlock */ $formBlock->setFormData($data); } $this->_view->renderLayout(); } }