protected function _prepareLayout() { $addButtonProps = ['id' => 'add_new_grid', 'label' => __('Add New Group'), 'class' => 'add', 'button_class' => '', 'class_name' => 'Magento\\Backend\\Block\\Widget\\Button\\SplitButton', 'options' => $this->_getAddButtonOptions()]; $this->buttonList->add('add_new', $addButtonProps); $this->setChild('grid', $this->getLayout()->createBlock('OuterEdge\\Layout\\Block\\Adminhtml\\Groups\\Grid', 'layout.view.groups')); return parent::_prepareLayout(); }
protected function _prepareLayout() { $this->_idGroup = $this->getRequest()->getParam('group_id'); $addButtonProps = ['id' => 'add_new_grid', 'label' => __('Add New Element'), 'class' => 'action-default scalable add primary', 'onclick' => "setLocation('" . $this->_getCreateUrl() . "')"]; $this->buttonList->add('add_new', $addButtonProps); $this->setChild('grid', $this->getLayout()->createBlock('OuterEdge\\Layout\\Block\\Adminhtml\\Elements\\Grid', 'layout.view.elements')); return parent::_prepareLayout(); }