Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Edit.php
Go to the documentation of this file.
1 <?php
8 
16 {
22  public function execute()
23  {
24  $variable = $this->_initVariable();
25 
26  $resultPage = $this->createPage();
27  $resultPage->getConfig()->getTitle()->prepend(__('Custom Variables'));
28  $resultPage->getConfig()->getTitle()->prepend(
29  $variable->getId() ? $variable->getCode() : __('New Custom Variable')
30  );
31  $resultPage->addContent($resultPage->getLayout()->createBlock(
32  \Magento\Variable\Block\System\Variable\Edit::class
33  ))->addJs(
34  $resultPage->getLayout()->createBlock(
35  \Magento\Framework\View\Element\Template::class,
36  '',
37  ['data' => ['template' => 'Magento_Variable::system/variable/js.phtml']]
38  )
39  );
40  return $resultPage;
41  }
42 }
__()
Definition: __.php:13
$variable
Definition: variable.php:7