Skip to content

Extension points

phil/money-bundle

What an application configures or extends. The amounts and currencies are phil/money's.

Configuration

OptionWhat it extends
currenciesThe currencies accepted, in the order a choice offers them; empty for every currency the CLDR data knows
default_currencyThe currency an empty amount starts in
doctrine_mappingWhether Phil\Money\Money is mapped as an ORM embeddable; false for a mapping of the application's own

See Configuration.

Forms and validation

PointHow
The currency of one fieldThe currency or currencies option of MoneyType — see Forms
Its errorThe invalid_message option
The currencies and amounts acceptedAcceptedCurrency and MoneyRange with their min, max and messages — see Validation
The messages in other languagesThe validators domain: the bundle ships English and French, an application adds or overrides others
More than the field doesA form type extension of the application's on MoneyType

Storage and Twig

PointHow
Where an amount is keptThe Money embeddable, or two columns of the application's with the phil_currency column type — see Doctrine
How an amount is shownThe format_money filter with its locale, and money_schema and price_schema for structured data — see Twig