@@ -75,29 +75,27 @@ protected function _prepareLayout()
7575 {
7676 /** @var $section \Magento\Config\Model\Config\Structure\Element\Section */
7777 $ section = $ this ->_configStructure ->getElement ($ this ->getRequest ()->getParam ('section ' ));
78- if ($ section !== null ) {
79- $ this ->_formBlockName = $ section ->getFrontendModel ();
80- if (empty ($ this ->_formBlockName )) {
81- $ this ->_formBlockName = self ::DEFAULT_SECTION_BLOCK ;
82- }
83- $ this ->setTitle ($ section ->getLabel ());
84- $ this ->setHeaderCss ($ section ->getHeaderCss ());
78+ $ this ->_formBlockName = $ section ->getFrontendModel ();
79+ if (empty ($ this ->_formBlockName )) {
80+ $ this ->_formBlockName = self ::DEFAULT_SECTION_BLOCK ;
81+ }
82+ $ this ->setTitle ($ section ->getLabel ());
83+ $ this ->setHeaderCss ($ section ->getHeaderCss ());
8584
86- $ this ->getToolbar ()->addChild (
87- 'save_button ' ,
88- \Magento \Backend \Block \Widget \Button::class,
89- [
90- 'id ' => 'save ' ,
91- 'label ' => __ ('Save Config ' ),
92- 'class ' => 'save primary ' ,
93- 'data_attribute ' => [
94- 'mage-init ' => ['button ' => ['event ' => 'save ' , 'target ' => '#config-edit-form ' ]],
95- ]
85+ $ this ->getToolbar ()->addChild (
86+ 'save_button ' ,
87+ \Magento \Backend \Block \Widget \Button::class,
88+ [
89+ 'id ' => 'save ' ,
90+ 'label ' => __ ('Save Config ' ),
91+ 'class ' => 'save primary ' ,
92+ 'data_attribute ' => [
93+ 'mage-init ' => ['button ' => ['event ' => 'save ' , 'target ' => '#config-edit-form ' ]],
9694 ]
97- );
98- $ block = $ this -> getLayout ()-> createBlock ( $ this -> _formBlockName );
99- $ this ->setChild ( ' form ' , $ block );
100- }
95+ ]
96+ );
97+ $ block = $ this ->getLayout ()-> createBlock ( $ this -> _formBlockName );
98+ $ this -> setChild ( ' form ' , $ block );
10199 return parent ::_prepareLayout ();
102100 }
103101
0 commit comments