protected function _prepareLayout()
    {
        /** @var $section \Magento\Config\Model\Config\Structure\Element\Section */
        $section = $this->configStructure->getElement($this->getRequest()->getParam('section'));
        $this->formBlockName = $section->getFrontendModel();
        if (empty($this->formBlockName)) {
            $this->formBlockName = self::DEFAULT_SECTION_BLOCK;
        }
        $this->setTitle($section->getLabel());
        $this->setHeaderCss($section->getHeaderCss());

        $this->getToolbar()->addChild(
            'save_button',
            'Magento\Backend\Block\Widget\Button',
            [
                'id'             => 'save',
                'label'          => __('Save Config'),
                'class'          => 'save primary',
                'data_attribute' => [
                    'mage-init' => ['button' => ['event' => 'save', 'target' => '#config-edit-form']],
                ],
            ]
        );
        $block = $this->getLayout()->createBlock($this->formBlockName);
        $this->setChild('form', $block);

        return parent::_prepareLayout();
    }
protected function _prepareLayout()
    {
        /** @var $section \Magento\Config\Model\Config\Structure\Element\Section */
        $section = $this->configStructure->getElement($this->getRequest()->getParam('section'));
        $this->formBlockName = $section->getFrontendModel();
        if (empty($this->formBlockName)) {
            $this->formBlockName = self::DEFAULT_SECTION_BLOCK;
        }
        $this->setTitle($section->getLabel());
        $this->setHeaderCss($section->getHeaderCss());

        $this->getToolbar()->addChild(
            'save_button',
            'Magento\Backend\Block\Widget\Button',
            [
                'id'             => 'save',
                'label'          => __('Save Config'),
                'class'          => 'save primary',
                'data_attribute' => [
                    'mage-init' => ['button' => ['event' => 'save', 'target' => '#config-edit-form']],
                ],
            ]
        );
        $block = $this->getLayout()->createBlock($this->formBlockName);
        $this->setChild('form', $block);

        return parent::_prepareLayout();
    }
protected function _prepareLayout ( ) { /** @var $section \Magento\Config\Model\Config\Structure\Element\Section */ $ section = $ this -> configStructure -> getElement ( $ this -> getRequest ( ) -> getParam ( 'section' ) ) ; $ this -> formBlockName = $ section -> getFrontendModel ( ) ; if ( empty ( $ this -> formBlockName ) ) { $ this -> formBlockName = self :: DEFAULT_SECTION_BLOCK ; } $ this -> setTitle ( $ section -> getLabel ( ) ) ; $ this -> setHeaderCss ( $ section -> getHeaderCss ( ) ) ; $ this -> getToolbar ( ) -> addChild ( 'save_button' , 'Magento\Backend\Block\Widget\Button' , [ 'id' => 'save' , 'label' => __ ( 'Save Config' ) , 'class' => 'save primary' , 'data_attribute' => [ 'mage-init' => [ 'button' => [ 'event' => 'save' , 'target' => '#config-edit-form' ] ] , ] , ] ) ; $ block = $ this -> getLayout ( ) -> createBlock ( $ this -> formBlockName ) ; $ this -> setChild ( 'form' , $ block ) ; return parent :: _prepareLayout ( ) ; }
Prepare layout object

@SuppressWarnings(PHPMD.CamelCaseMethodName)

@return \Magento\Framework\View\Element\AbstractBlock
Prepare layout object