Skip to content

MoneyHelper

Type
Class
Namespace
craft\helpers
Inherits
craft\helpers\MoneyHelper
Since
4.0.0

Class MoneyHelper

View source

Public Methods

MethodDescription
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

Arguments

  • $value (mixed)

Returns

string, false

toMoney()

View source

Arguments

  • $value (mixed)

Returns

\Money\Money, false

toNumber()

Convert money object to localized decimal string.

View source

Arguments

Returns

string, false

toString()

Convert money object to localized currency string.

View source

Arguments

Returns

string, false