/** * Initialize child blocks * * @return $this */ protected function _prepareLayout() { $this->setChild('export_button', $this->getLayout()->createBlock('Magento\\Backend\\Block\\Widget\\Button')->setData(['label' => __('Export'), 'onclick' => $this->getJsObjectName() . '.doExport()', 'class' => 'task'])); $this->setChild('reset_filter_button', $this->getLayout()->createBlock('Magento\\Backend\\Block\\Widget\\Button')->setData(['label' => __('Reset Filter'), 'onclick' => $this->getJsObjectName() . '.resetFilter()', 'class' => 'action-reset action-tertiary'])->setDataAttribute(['action' => 'grid-filter-reset'])); $this->setChild('search_button', $this->getLayout()->createBlock('Magento\\Backend\\Block\\Widget\\Button')->setData(['label' => __('Search'), 'onclick' => $this->getJsObjectName() . '.doFilter()', 'class' => 'task action-secondary'])->setDataAttribute(['action' => 'grid-filter-apply'])); return parent::_prepareLayout(); }
/** * Initialize child blocks * * @return $this */ protected function _prepareLayout() { $this->setChild('export_button', $this->getLayout()->createBlock('Magento\\Backend\\Block\\Widget\\Button')->setData(array('label' => __('Export'), 'onclick' => $this->getJsObjectName() . '.doExport()', 'class' => 'task'))); $this->setChild('reset_filter_button', $this->getLayout()->createBlock('Magento\\Backend\\Block\\Widget\\Button')->setData(array('label' => __('Reset Filter'), 'onclick' => $this->getJsObjectName() . '.resetFilter()'))); $this->setChild('search_button', $this->getLayout()->createBlock('Magento\\Backend\\Block\\Widget\\Button')->setData(array('label' => __('Search'), 'onclick' => $this->getJsObjectName() . '.doFilter()', 'class' => 'task'))); return parent::_prepareLayout(); }