14 class Totals extends \Magento\Backend\Block\Dashboard\Bar
19 protected $_template =
'Magento_Backend::dashboard/totalbar.phtml';
39 parent::__construct($context, $collectionFactory,
$data);
47 if (!$this->_moduleManager->isEnabled(
'Magento_Reports')) {
57 $period = $this->
getRequest()->getParam(
'period',
'24h');
60 $collection = $this->_collectionFactory->create()->addCreateAtPeriodFilter(
69 if ($this->
getRequest()->getParam(
'website')) {
70 $storeIds = $this->_storeManager->getWebsite($this->
getRequest()->getParam(
'website'))->getStoreIds();
71 $collection->addFieldToFilter(
'store_id', [
'in' => $storeIds]);
74 $storeIds = $this->_storeManager->getGroup($this->
getRequest()->getParam(
'group'))->getStoreIds();
75 $collection->addFieldToFilter(
'store_id', [
'in' => $storeIds]);
79 [
'eq' => $this->_storeManager->getStore(\
Magento\Store\Model\Store::ADMIN_CODE)->getId()]
elseif(isset( $params[ 'redirect_parent']))
addTotal($label, $value, $isQuantity=false)
__construct(\Magento\Backend\Block\Template\Context $context, \Magento\Reports\Model\ResourceModel\Order\CollectionFactory $collectionFactory, \Magento\Framework\Module\Manager $moduleManager, array $data=[])