Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
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) | |
round ($price) | |
getCurrency ($scope=null, $currency=null) | |
getCurrencySymbol ($scope=null, $currency=null) | |
Data Fields | |
const | DEFAULT_PRECISION = 2 |
Interface PriceCurrencyInterface
@api
Definition at line 15 of file PriceCurrencyInterface.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 |
Implemented in PriceCurrency.
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 |
Implemented in PriceCurrency.
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 |
Implemented in PriceCurrency.
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 |
Implemented in PriceCurrency.
getCurrency | ( | $scope = null , |
|
$currency = null |
|||
) |
Get currency model
null | string | bool | int | \Magento\Framework\App\ScopeInterface | $scope | |
\Magento\Framework\Model\AbstractModel | string | null | $currency |
Implemented in PriceCurrency.
getCurrencySymbol | ( | $scope = null , |
|
$currency = null |
|||
) |
null | string | bool | int | \Magento\Framework\App\ScopeInterface | $scope | |
\Magento\Framework\Model\AbstractModel | string | null | $currency |
Implemented in PriceCurrency.
round | ( | $price | ) |
const DEFAULT_PRECISION = 2 |
Default precision
Definition at line 20 of file PriceCurrencyInterface.php.