Presenter Output

This section will show you how to use the decorated value provided by the \Anomaly\IntegerFieldType\IntegerFieldTypePresenter class.

IntegerFieldTypePresenter::format()

The format method returns the formatted number string according to configuration.

Returns: string
Example
$decorated->example->format();
Twig
{{ decorated.example.format() }}

IntegerFieldTypePresenter::currency()

The currency method returns the currency formatted value.

Returns: string
Arguments
Key Required Type Default Description
$currency false string The currency field value or default configured currency. The currency to format for.
$field false string currency The slug of the currency field.
Example
$decorated->example->currency();
Twig
{{ decorated.example.currency() }}