[symfony-users] Re: Symfony2 Twig Helpers and _view variable

2011-01-25 Thread Jérôme TEXIER
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

Re: [symfony-users] Re: Symfony2 Twig Helpers and _view variable

2011-01-24 Thread Fabien Potencier
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

[symfony-users] Re: Symfony2 Twig Helpers and _view variable

2011-01-24 Thread Jérôme TEXIER
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