14 use \Magento\Framework\App\ObjectManager;
15 use \Magento\Framework\Serialize\Serializer\Json;
38 protected $_template =
'Magento_Config::system/config/edit.phtml';
50 private $jsonSerializer;
60 \
Magento\Config\Model\Config\Structure $configStructure,
62 Json $jsonSerializer =
null 64 $this->_configStructure = $configStructure;
66 parent::__construct($context,
$data);
77 $section = $this->_configStructure->getElement($this->
getRequest()->getParam(
'section'));
78 $this->_formBlockName = $section->getFrontendModel();
79 if (empty($this->_formBlockName)) {
82 $this->setTitle($section->getLabel());
83 $this->setHeaderCss($section->getHeaderCss());
87 \
Magento\Backend\Block\Widget\Button::class,
90 'label' =>
__(
'Save Config'),
91 'class' =>
'save primary',
93 'mage-init' => [
'button' => [
'event' =>
'save',
'target' =>
'#config-edit-form']],
99 return parent::_prepareLayout();
119 return $this->
getUrl(
'*/system_config/save', [
'_current' =>
true]);
128 if ($this->
getRequest()->getParam(
'section')) {
137 return $this->jsonSerializer->serialize(
$params);
const DEFAULT_SECTION_BLOCK
getUrl($route='', $params=[])
__construct(\Magento\Backend\Block\Template\Context $context, \Magento\Config\Model\Config\Structure $configStructure, array $data=[], Json $jsonSerializer=null)
getConfigSearchParamsJson()
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
getChildHtml($alias='', $useCache=true)