MoneyHelper
- Type
- Class
- Namespace
- craft\helpers
- Inherits
- craft\helpers\MoneyHelper
- Since
- 4.0.0
Class MoneyHelper
View source (opens new window)
# Public Methods
Method | Description |
---|---|
toDecimal() | Convert money object to standard decimal string. |
toMoney() | |
toNumber() | Convert money object to localized decimal string. |
toString() | Convert money object to localized currency string. |
# toDecimal()
Convert money object to standard decimal string.
View source (opens new window)
Arguments
$value
(mixed
)
Returns
string (opens new window), false (opens new window)
# toMoney()
View source (opens new window)
Arguments
$value
(mixed
)
Returns
\Money\Money
, false (opens new window)
# toNumber()
Convert money object to localized decimal string.
View source (opens new window)
Arguments
$value
(mixed
)$formatLocale
(string (opens new window), null (opens new window))
Returns
string (opens new window), false (opens new window)
# toString()
Convert money object to localized currency string.
View source (opens new window)
Arguments
$value
(mixed
)$formatLocale
(string (opens new window), null (opens new window))