I have this simple question. Can I nesting filters in twig, using syfmony2?
Imagine I need to do the following in twig:
{{ custom_function(var)|filter1|filter2 }}
Also I need respect the order. The "filter1" filter output, has to be the "filter2" filter input.
Example:
{{ getPrice(var)|formatPrize(2,'.')|prizeSymbol('$') }}
prints: $ 12.25
{{ getPrice(var)|formatPrize(3,',')|prizeSymbol('u$s') }}
prints: u$s 12.251
The above requirement is useless, but i need to do something like this.
I know how to make the twig extension, but not how to solve nesting.