I\'m trying to execute a closure that resides inside an array on a Twig template. Below you could find a simplified snippet of which I\'m trying:
//Sym
If you are using a closure you can use the the call method of the closure
http://php.net/manual/en/closure.call.php
You will end up with something like this
{{ funcs.conditional.call(obj, obj) }}
Since the first parameter must be the object that 'this' will refer too I am passing the same object as the first parameter.
No twig extension and no extra PHP code to do ;)