CurrencyViewHelper extends AbstractViewHelper

ViewHelper

This class is the implementation of a Fluid ViewHelper.

View this class in the TYPO3 ViewHelper reference: <f:format.currency>

FinalYes

Formats a given float to a currency representation.

Examples

Defaults

::

<f:format.currency>123.456</f:format.currency>

Output::

123,46

All parameters

::

<f:format.currency decimalSeparator="." thousandsSeparator="," decimals="2" currencySign="$" prependCurrency="true" separateCurrency="false"

   54321

</f:format.currency>

Output::

$54,321.00

Inline notation

::

{someNumber -> f:format.currency(thousandsSeparator: ',', currencySign: 'EUR')}

Output::

54,321,00 EUR

Depending on the value of {someNumber}.

Use dash for decimals without value

::

<f:format.currency useDash="true">123.00</f:format.currency>

Output::

123,-

Table of Contents

Properties

$escapeChildren  : bool
Output is escaped already. We must not escape children, to avoid double encoding.

Methods

initializeArguments()  : void
render()  : string

Properties

$escapeChildren

Output is escaped already. We must not escape children, to avoid double encoding.

protected bool $escapeChildren = false

Methods

initializeArguments()

public initializeArguments() : void

render()

public render() : string
Return values
string

        
On this page

Search results