-us...@googlegroups.com]
On Behalf Of François CONSTANT
Sent: Tuesday, December 16, 2008 5:45 AM
To: symfony users
Subject: [symfony-users] Re: Use sfUser attribute in view.yml
That sounds obvious now, it does work :)
To sum it up, if someone wants to do the same just put at the begining
CONSTANT
Sent: Tuesday, December 16, 2008 5:45 AM
To: symfony users
Subject: [symfony-users] Re: Use sfUser attribute in view.yml
That sounds obvious now, it does work :)
To sum it up, if someone wants to do the same just put at the begining
of the yaml file :
?php
$sf_user = sfContext
On 16 Dec 2008, at 11:34, François CONSTANT wrote:
I would like to get a user attribute in view.yml (in order to modify
the title).
I know that I can use some php in this file but what I don't know is
how to access the sf_user object. Within an action I could use $this-
getUser() and set up
That sounds obvious now, it does work :)
To sum it up, if someone wants to do the same just put at the begining
of the yaml file :
?php
$sf_user = sfContext::getInstance()-getUser();
?
Then you can use $sf_user exactly in the same way than in a template.
I just got started with Symfony
-users] Re: Use sfUser attribute in view.yml
That sounds obvious now, it does work :)
To sum it up, if someone wants to do the same just put at the begining
of the yaml file :
?php
$sf_user = sfContext::getInstance()-getUser();
?
Then you can use $sf_user exactly in the same