NumberViewHelper extends AbstractViewHelper uses CompileWithRenderStatic

ViewHelper

This class is the implementation of a Fluid ViewHelper.

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

Formats a number with custom precision, decimal point and grouped thousands.

See https://www.php.net/manual/function.number-format.php.

Examples

Defaults

::

<f:format.number>423423.234</f:format.number>

423,423.20

With all parameters

::

<f:format.number decimals="1" decimalSeparator="," thousandsSeparator="."> 423423.234 </f:format.number>

423.423,2

Table of Contents

Properties

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

Methods

initializeArguments()  : mixed
Initialize arguments.
renderStatic()  : string
Format the numeric value as a number with grouped thousands, decimal point and precision.

Properties

$escapeChildren

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

protected bool $escapeChildren = false

Methods

initializeArguments()

Initialize arguments.

public initializeArguments() : mixed
Tags
throws
Exception

renderStatic()

Format the numeric value as a number with grouped thousands, decimal point and precision.

public static renderStatic(array<string|int, mixed> $arguments, Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) : string
Parameters
$arguments : array<string|int, mixed>
$renderChildrenClosure : Closure
$renderingContext : RenderingContextInterface
Return values
string

The formatted number


        
On this page

Search results