/** * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Catalog\Helper\Data $catalogData * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Sales\Model\Config $salesConfig * @param \Magento\Tax\Model\Config $taxConfig * @param array $data */ public function __construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Catalog\Helper\Data $catalogData, \Magento\Customer\Model\Session $customerSession, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Sales\Model\Config $salesConfig, \Magento\Tax\Model\Config $taxConfig, array $data = array()) { $this->_taxConfig = $taxConfig; parent::__construct($context, $catalogData, $customerSession, $checkoutSession, $salesConfig, $data); $this->_isScopePrivate = true; }
/** * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Customer\Model\Session $customerSession * @param \Magento\Checkout\Model\Session $checkoutSession * @param \Magento\Sales\Model\Config $salesConfig * @param \Magento\Tax\Model\Config $taxConfig * @param array $layoutProcessors * @param array $data */ public function __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 = []) { $this->_taxConfig = $taxConfig; parent::__construct($context, $customerSession, $checkoutSession, $salesConfig, $layoutProcessors, $data); $this->_isScopePrivate = true; }
/** * Import total data into the block, if there are items * * @return string */ protected function _toHtml() { $total = $this->getTotal(); $items = $total->getItems(); if ($items) { foreach ($total->getData() as $key => $value) { $this->setData("total_{$key}", $value); } return parent::_toHtml(); } return ''; }