Add a new function for number formating

[MAILPOET-1526]
This commit is contained in:
Pavel Dohnal
2018-09-17 16:19:56 +02:00
parent 44f0f7fa9e
commit edd447ce82
2 changed files with 8 additions and 3 deletions

View File

@ -128,4 +128,4 @@ class Renderer {
$this->assets_manifest_css[$asset] : $this->assets_manifest_css[$asset] :
$asset; $asset;
} }
} }

View File

@ -95,7 +95,12 @@ class Functions extends \Twig_Extension {
'is_rtl', 'is_rtl',
array($this, 'isRtl'), array($this, 'isRtl'),
array('is_safe' => array('all')) array('is_safe' => array('all'))
) ),
new \Twig_SimpleFunction(
'number_format_i18n',
'number_format_i18n',
array('is_safe' => array('all'))
),
); );
} }
@ -181,4 +186,4 @@ class Functions extends \Twig_Extension {
function isRtl() { function isRtl() {
return is_rtl(); return is_rtl();
} }
} }