Money

Use the money type for instances of moneyphp/money objects.

Included in the PerformBaseBundle.

Options

form_options

An array of options to pass to the underlying form type.

This option is optional.

Allowed types: array

Defaults:

  • List context: []
  • View context: []
  • Create context: []
  • Edit context: []

label

The label to use for form labels and table headings. If no label is provided, a sensible label will be created automatically.

This option is optional.

Allowed types: string

Defaults:

  • List context: No default
  • View context: No default
  • Create context: No default
  • Edit context: No default

Example

<?php
$config->add('amount', [
    'type' => 'money',
    'options' => [
        'form_options' => [
            'default_currency' => 'GBP',
            'currencies' => ['GBP', 'EUR', 'USD'],
        ]
    ]
]);