Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Bestsellers.php
Go to the documentation of this file.
1 <?php
7 
15 class Bestsellers extends \Magento\Backend\Block\Widget\Grid\Container
16 {
22  protected $_template = 'Magento_Reports::report/grid/container.phtml';
23 
27  protected function _construct()
28  {
29  $this->_blockGroup = 'Magento_Reports';
30  $this->_controller = 'adminhtml_sales_bestsellers';
31  $this->_headerText = __('Products Bestsellers Report');
32  parent::_construct();
33 
34  $this->buttonList->remove('add');
35  $this->addButton(
36  'filter_form_submit',
37  ['label' => __('Show Report'), 'onclick' => 'filterFormSubmit()', 'class' => 'primary']
38  );
39  }
40 
46  public function getFilterUrl()
47  {
48  $this->getRequest()->setParam('filter', null);
49  return $this->getUrl('*/*/bestsellers', ['_current' => true]);
50  }
51 }
__()
Definition: __.php:13
addButton($buttonId, $data, $level=0, $sortOrder=0, $region='toolbar')
Definition: Container.php:85