Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Subtotal.php
Go to the documentation of this file.
1 <?php
7 
12 {
18  protected $_template = 'Magento_Tax::checkout/subtotal.phtml';
19 
23  protected $_taxConfig;
24 
34  public function __construct(
35  \Magento\Framework\View\Element\Template\Context $context,
36  \Magento\Customer\Model\Session $customerSession,
37  \Magento\Checkout\Model\Session $checkoutSession,
38  \Magento\Sales\Model\Config $salesConfig,
39  \Magento\Tax\Model\Config $taxConfig,
40  array $layoutProcessors = [],
41  array $data = []
42  ) {
43  $this->_taxConfig = $taxConfig;
44  parent::__construct($context, $customerSession, $checkoutSession, $salesConfig, $layoutProcessors, $data);
45  $this->_isScopePrivate = true;
46  }
47 
51  public function displayBoth()
52  {
53  return $this->_taxConfig->displayCartSubtotalBoth($this->getStore());
54  }
55 }
__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: Subtotal.php:34