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 was thinking on how to use those functions now without the _view variable. I understand now that I simply should define those functions as Twig_Function_Method on a TwigExtension. Is that correct ? On 24 jan, 00:48, Fabien Potencier <fabien.potenc...@symfony- project.com> wrote: > On 1/24/11 5:20 AM, Jérôme TEXIER wrote: > > > Hello, > > > sincehttps://github.com/symfony/symfony/commit/b60d254be2f9b9a8b1340a8f7b4... > > _view variable no more exist on templates. > > Before PR5, I was using this variable to access to some injected Twig > > helper functions. > > It doesn't seem really clear to me now what it's best way to do it now > > without this variable. > > Should we use request global variable to get a defined helper > > service ? > > Can you give me an example of what you are trying to do? > > Fabien -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
