new DoTokenParser(),
new EmbedTokenParser(),
new WithTokenParser(),
new DeprecatedTokenParser(),
];
} public function getFilters(): array
{ return [ // formatting filters
new TwigFilter('date', 'twig_date_format_filter',
['needs_environment' => true
]),
new TwigFilter('date_modify', 'twig_date_modify_filter',
['needs_environment' => true
]),
new TwigFilter('format', 'twig_sprintf'
),
new TwigFilter('replace', 'twig_replace_filter'
),
new TwigFilter('number_format', 'twig_number_format_filter',
['needs_environment' => true
]),
new TwigFilter('abs', 'abs'
),
new TwigFilter('round', 'twig_round'
),
// encoding
new TwigFilter('url_encode', 'twig_urlencode_filter'
),
new TwigFilter('json_encode', 'json_encode'
),
new TwigFilter('convert_encoding', 'twig_convert_encoding'
),