12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?php
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- namespace Magento\Sales\Block\Adminhtml\Order\Create\Totals;
- use Magento\Framework\Pricing\PriceCurrencyInterface;
- /**
- * Default Total Row Renderer
- *
- * @author Magento Core Team <core@magentocommerce.com>
- */
- class DefaultTotals extends \Magento\Sales\Block\Adminhtml\Order\Create\Totals
- {
- /**
- * Template
- *
- * @var string
- */
- protected $_template = 'Magento_Sales::order/create/totals/default.phtml';
- /**
- * @var PriceCurrencyInterface
- */
- protected $priceCurrency;
- /**
- * Retrieve quote session object
- *
- * @return \Magento\Backend\Model\Session\Quote
- */
- protected function _getSession()
- {
- return $this->_sessionQuote;
- }
- /**
- * Retrieve store model object
- *
- * @return \Magento\Store\Model\Store
- */
- public function getStore()
- {
- return $this->_getSession()->getStore();
- }
- /**
- * Format price
- *
- * @param float $value
- * @return string
- */
- public function formatPrice($value)
- {
- return $this->priceCurrency->format(
- $value,
- true,
- PriceCurrencyInterface::DEFAULT_PRECISION,
- $this->getStore()
- );
- }
- }
|