Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Discount.php
Go to the documentation of this file.
1 <?php
7 
12 {
16  protected $_taxConfig;
17 
27  public function __construct(
28  \Magento\Framework\View\Element\Template\Context $context,
29  \Magento\Customer\Model\Session $customerSession,
30  \Magento\Checkout\Model\Session $checkoutSession,
31  \Magento\Sales\Model\Config $salesConfig,
32  \Magento\Tax\Model\Config $taxConfig,
33  array $layoutProcessors = [],
34  array $data = []
35  ) {
36  $this->_taxConfig = $taxConfig;
37  parent::__construct($context, $customerSession, $checkoutSession, $salesConfig, $layoutProcessors, $data);
38  $this->_isScopePrivate = true;
39  }
40 
44  public function displayBoth()
45  {
46  return $this->_taxConfig->displayCartSubtotalBoth();
47  }
48 }
__construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Customer\Model\Session $customerSession, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Sales\Model\Config $salesConfig, \Magento\Tax\Model\Config $taxConfig, array $layoutProcessors=[], array $data=[])
Definition: Discount.php:27