Thanks Fabien.
Indeed I was doing well :
- creating a FooExtension class extending TwigExtension
- defining some custom filters or functions in it
- registering that class as a service with a twig.extension tag name
But custom functions weren't found by twig, 2 reasons for that :
- a dumb mis
On 1/24/11 5:02 PM, Jérôme TEXIER wrote:
Hi Fabien,
My question is just what is the best way to use some user-defined
helper functions (for instance a bread crumb function) on Twig.
Before PR5, I was injecting helper class (Templating\Helper
\FooHelper.php) on the view and had access to those fu
Hi Fabien,
My question is just what is the best way to use some user-defined
helper functions (for instance a bread crumb function) on Twig.
Before PR5, I was injecting helper class (Templating\Helper
\FooHelper.php) on the view and had access to those functions via the
former _view variable.
I w