TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
CurrencyViewHelper Class Reference
Inheritance diagram for CurrencyViewHelper:
AbstractViewHelper

Public Member Functions

 initializeArguments ()
 
- Public Member Functions inherited from AbstractViewHelper
 setRenderingContext (\TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 
 injectObjectManager (\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager)
 
 injectReflectionService (\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService)
 
 prepareArguments ()
 

Static Public Member Functions

static renderStatic (array $arguments,\Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
 

Protected Attributes

 $escapeChildren = false
 
- Protected Attributes inherited from AbstractViewHelper
 $controllerContext
 
 $objectManager
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractViewHelper
 callRenderMethod ()
 
 getLogger ()
 
 registerRenderMethodArguments ()
 

Detailed Description

Formats a given float to a currency representation.

= Examples =

<f:format.currency>123.456</f:format.currency> <output> 123,46 </output>

<f:format.currency currencySign="$" decimalSeparator="." thousandsSeparator="," prependCurrency="TRUE" separateCurrency="FALSE" decimals="2">54321</f:format.currency> <output> $54,321.00 </output>

{someNumber -> f:format.currency(thousandsSeparator: ',', currencySign: '€')} <output> 54,321,00 € (depending on the value of {someNumber}) </output>

Definition at line 50 of file CurrencyViewHelper.php.

Member Function Documentation

initializeArguments ( )

Initialize arguments.

Exceptions
TYPO3Fluid

Definition at line 66 of file CurrencyViewHelper.php.

static renderStatic ( array  $arguments,
\Closure  $renderChildrenClosure,
RenderingContextInterface  $renderingContext 
)
static

Formats a float to currency formatting

Parameters
array$arguments
\Closure$renderChildrenClosure
RenderingContextInterface$renderingContext
Returns
string the formatted amount

Definition at line 86 of file CurrencyViewHelper.php.

Member Data Documentation

$escapeChildren = false
protected

Definition at line 59 of file CurrencyViewHelper.php.