/** * Preparing global layout * * @return \Magento\Framework\View\Element\AbstractBlock */ protected function _prepareLayout() { $this->addChild('add_button', 'Magento\\Backend\\Block\\Widget\\Button', ['label' => __('Add New Attribute'), 'class' => 'add', 'id' => 'add_new_attribute', 'on_click' => 'gContentAttribute.add()']); $this->addChild('delete_button', 'Magento\\Backend\\Block\\Widget\\Button', ['label' => __('Remove'), 'class' => 'delete delete-product-option', 'on_click' => 'gContentAttribute.remove(event)']); return parent::_prepareLayout(); }