2 namespace TYPO3\CMS\Fluid\ViewHelpers\Format;
59 public function render($currencySign =
'', $decimalSeparator =
',', $thousandsSeparator =
'.', $prependCurrency =
false, $separateCurrency =
true, $decimals = 2)
61 return static::renderStatic(
63 'currencySign' => $currencySign,
64 'decimalSeparator' => $decimalSeparator,
65 'thousandsSeparator' => $thousandsSeparator,
66 'prependCurrency' => $prependCurrency,
67 'separateCurrency' => $separateCurrency,
68 'decimals' => $decimals
71 $this->renderingContext
84 $currencySign = $arguments[
'currencySign'];
85 $decimalSeparator = $arguments[
'decimalSeparator'];
86 $thousandsSeparator = $arguments[
'thousandsSeparator'];
87 $prependCurrency = $arguments[
'prependCurrency'];
88 $separateCurrency = $arguments[
'separateCurrency'];
89 $decimals = $arguments[
'decimals'];
92 if (empty($floatToFormat)) {
95 $floatToFormat = floatval($floatToFormat);
97 $output = number_format($floatToFormat, $decimals, $decimalSeparator, $thousandsSeparator);
98 if ($currencySign !==
'') {
99 $currencySeparator = $separateCurrency ?
' ' :
'';
100 if ($prependCurrency ===
true) {
101 $output = $currencySign . $currencySeparator . $output;
103 $output = $output . $currencySeparator . $currencySign;