|
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
| __construct (StoreManagerInterface $storeManager, CurrencyFactory $currencyFactory, Logger $logger) | |
| convert ($amount, $scope=null, $currency=null) | |
| convertAndRound ($amount, $scope=null, $currency=null, $precision=self::DEFAULT_PRECISION) | |
| format ( $amount, $includeContainer=true, $precision=self::DEFAULT_PRECISION, $scope=null, $currency=null) | |
| convertAndFormat ( $amount, $includeContainer=true, $precision=self::DEFAULT_PRECISION, $scope=null, $currency=null) | |
| getCurrency ($scope=null, $currency=null) | |
| getCurrencySymbol ($scope=null, $currency=null) | |
| round ($price) | |
Protected Member Functions | |
| getStore ($scope=null) | |
Protected Attributes | |
| $storeManager | |
| $currencyFactory | |
| $logger | |
Additional Inherited Members | |
Data Fields inherited from PriceCurrencyInterface | |
| const | DEFAULT_PRECISION = 2 |
Class PriceCurrency model for convert and format price value
Definition at line 16 of file PriceCurrency.php.
| __construct | ( | StoreManagerInterface | $storeManager, |
| CurrencyFactory | $currencyFactory, | ||
| Logger | $logger | ||
| ) |
| \Magento\Store\Model\StoreManagerInterface | $storeManager | |
| CurrencyFactory | $currencyFactory | |
| Logger | $logger |
Definition at line 38 of file PriceCurrency.php.
| convert | ( | $amount, | |
$scope = null, |
|||
$currency = null |
|||
| ) |
{Convert price value
| float | $amount | |
| null | string | bool | int | \Magento\Framework\App\ScopeInterface | $scope | |
| \Magento\Framework\Model\AbstractModel | string | null | $currency |
Implements PriceCurrencyInterface.
Definition at line 51 of file PriceCurrency.php.
| convertAndFormat | ( | $amount, | |
$includeContainer = true, |
|||
$precision = self::DEFAULT_PRECISION, |
|||
$scope = null, |
|||
$currency = null |
|||
| ) |
{Convert and format price value
| float | $amount | |
| bool | $includeContainer | |
| int | $precision | |
| null | string | bool | int | \Magento\Framework\App\ScopeInterface | $scope | |
| \Magento\Framework\Model\AbstractModel | string | null | $currency |
Implements PriceCurrencyInterface.
Definition at line 87 of file PriceCurrency.php.
| convertAndRound | ( | $amount, | |
$scope = null, |
|||
$currency = null, |
|||
$precision = self::DEFAULT_PRECISION |
|||
| ) |
{Convert and round price value
| float | $amount | |
| null | string | bool | int | \Magento\Framework\App\ScopeInterface | $scope | |
| \Magento\Framework\Model\AbstractModel | string | null | $currency | |
| int | $precision |
Implements PriceCurrencyInterface.
Definition at line 63 of file PriceCurrency.php.
| format | ( | $amount, | |
$includeContainer = true, |
|||
$precision = self::DEFAULT_PRECISION, |
|||
$scope = null, |
|||
$currency = null |
|||
| ) |
{Format price value
| float | $amount | |
| bool | $includeContainer | |
| int | $precision | |
| null | string | bool | int | \Magento\Framework\App\ScopeInterface | $scope | |
| \Magento\Framework\Model\AbstractModel | string | null | $currency |
Implements PriceCurrencyInterface.
Definition at line 73 of file PriceCurrency.php.
| getCurrency | ( | $scope = null, |
|
$currency = null |
|||
| ) |
{Get currency model
| null | string | bool | int | \Magento\Framework\App\ScopeInterface | $scope | |
| \Magento\Framework\Model\AbstractModel | string | null | $currency |
Implements PriceCurrencyInterface.
Definition at line 102 of file PriceCurrency.php.
| getCurrencySymbol | ( | $scope = null, |
|
$currency = null |
|||
| ) |
| null | string | bool | int | \Magento\Framework\App\ScopeInterface | $scope | |
| \Magento\Framework\Model\AbstractModel | string | null | $currency |
Implements PriceCurrencyInterface.
Definition at line 125 of file PriceCurrency.php.
|
protected |
Get store model
| null | string | bool | int | ScopeInterface | $scope |
Definition at line 136 of file PriceCurrency.php.
| round | ( | $price | ) |
Round price
| float | $price |
Implements PriceCurrencyInterface.
Definition at line 156 of file PriceCurrency.php.
|
protected |
Definition at line 26 of file PriceCurrency.php.
|
protected |
Definition at line 31 of file PriceCurrency.php.
|
protected |
Definition at line 21 of file PriceCurrency.php.