On 23.09.2010 09:09, Henrik Bjornskov wrote:
> i belive twig templates have a "_view" variable for accessing helpers
> so you should be able to do { _view.twitter_anywhere.setup() } (cant
> remember if the parantheses are needed)

Yes, I think I saw that somewhere yesterday, too late obviously, but I
still think it might be good to allow any helper to define a nicer
syntax for itself.

There is just one thing I haven't verified, it's whether all helpers are
instanciated always or whether they're lazy loaded. Because with my
patch they are all instanciated to check if they have a token provider.
So it'd be a bit wasteful if they're never used and otherwise would be
lazy-loaded.

The other approach I see that would skip the instanciation is to define
custom tokens inside the configuration, but that didn't seem as nice to me.

Cheers

-- 
Jordi Boggiano
@seldaek :: http://seld.be/

-- 
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 developers" 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-devs?hl=en

Reply via email to