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>

FinalYes

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()  : void
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()

public initializeArguments() : void

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

        
On this page

Search results