Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AbstractDashboard.php
Go to the documentation of this file.
1 <?php
8 
10 
17 {
21  protected $_dataHelper = null;
22 
27 
33  public function __construct(
34  \Magento\Backend\Block\Template\Context $context,
35  \Magento\Reports\Model\ResourceModel\Order\CollectionFactory $collectionFactory,
36  array $data = []
37  ) {
38  $this->_collectionFactory = $collectionFactory;
39  parent::__construct($context, $data);
40  }
41 
45  public function getCollection()
46  {
47  return $this->getDataHelper()->getCollection();
48  }
49 
53  public function getCount()
54  {
55  return $this->getDataHelper()->getCount();
56  }
57 
63  public function getDataHelper()
64  {
65  return $this->_dataHelper;
66  }
67 
71  protected function _prepareData()
72  {
73  return $this;
74  }
75 
79  protected function _prepareLayout()
80  {
81  $this->_prepareData();
82  return parent::_prepareLayout();
83  }
84 }
__construct(\Magento\Backend\Block\Template\Context $context, \Magento\Reports\Model\ResourceModel\Order\CollectionFactory $collectionFactory, array $data=[])