Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Sales.php
Go to the documentation of this file.
1 <?php
13 
19 abstract class Sales extends AbstractReport
20 {
26  public function _initAction()
27  {
28  parent::_initAction();
29  $this->_addBreadcrumb(__('Sales'), __('Sales'));
30  return $this;
31  }
32 
38  protected function _isAllowed()
39  {
40  switch ($this->getRequest()->getActionName()) {
41  case 'sales':
42  return $this->_authorization->isAllowed('Magento_Reports::salesroot_sales');
43  break;
44  case 'tax':
45  return $this->_authorization->isAllowed('Magento_Reports::tax');
46  break;
47  case 'shipping':
48  return $this->_authorization->isAllowed('Magento_Reports::shipping');
49  break;
50  case 'invoiced':
51  return $this->_authorization->isAllowed('Magento_Reports::invoiced');
52  break;
53  case 'refunded':
54  return $this->_authorization->isAllowed('Magento_Reports::refunded');
55  break;
56  case 'coupons':
57  return $this->_authorization->isAllowed('Magento_Reports::coupons');
58  break;
59  case 'bestsellers':
60  return $this->_authorization->isAllowed('Magento_Reports::bestsellers');
61  break;
62  default:
63  return $this->_authorization->isAllowed('Magento_Reports::salesroot');
64  break;
65  }
66  }
67 }
__()
Definition: __.php:13
_addBreadcrumb($label, $title, $link=null)