Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Orders.php
Go to the documentation of this file.
1 <?php
13 
14 class Orders extends \Magento\Backend\Block\Dashboard\Graph
15 {
23  public function __construct(
24  \Magento\Backend\Block\Template\Context $context,
25  \Magento\Reports\Model\ResourceModel\Order\CollectionFactory $collectionFactory,
26  \Magento\Backend\Helper\Dashboard\Data $dashboardData,
27  \Magento\Backend\Helper\Dashboard\Order $dataHelper,
28  array $data = []
29  ) {
30  $this->_dataHelper = $dataHelper;
31  parent::__construct($context, $collectionFactory, $dashboardData, $data);
32  }
33 
39  protected function _construct()
40  {
41  $this->setHtmlId('orders');
42  parent::_construct();
43  }
44 
50  protected function _prepareData()
51  {
52  $this->getDataHelper()->setParam('store', $this->getRequest()->getParam('store'));
53  $this->getDataHelper()->setParam('website', $this->getRequest()->getParam('website'));
54  $this->getDataHelper()->setParam('group', $this->getRequest()->getParam('group'));
55 
56  $this->setDataRows('quantity');
57  $this->_axisMaps = ['x' => 'range', 'y' => 'quantity'];
58 
59  parent::_prepareData();
60  }
61 }
__construct(\Magento\Backend\Block\Template\Context $context, \Magento\Reports\Model\ResourceModel\Order\CollectionFactory $collectionFactory, \Magento\Backend\Helper\Dashboard\Data $dashboardData, \Magento\Backend\Helper\Dashboard\Order $dataHelper, array $data=[])
Definition: Orders.php:23