Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
DefaultTotal.php
Go to the documentation of this file.
1 <?php
7 
11 class DefaultTotal extends \Magento\Checkout\Block\Cart\Totals
12 {
16  protected $_template = 'Magento_Checkout::total/default.phtml';
17 
21  protected $_store;
22 
26  protected function _construct()
27  {
28  parent::_construct();
29  $this->_store = $this->_storeManager->getStore();
30  }
31 
37  public function getStyle()
38  {
39  return $this->getTotal()->getStyle();
40  }
41 
46  public function setTotal($total)
47  {
48  $this->setData('total', $total);
49  if ($total->getAddress()) {
50  $this->_store = $total->getAddress()->getQuote()->getStore();
51  }
52  return $this;
53  }
54 
58  public function getStore()
59  {
60  return $this->_store;
61  }
62 }
setData($key, $value=null)
Definition: DataObject.php:72