Oh thx so: class myUser extends sfBasicSecurityUser { public function Test() { return Doctrine::getTable('Texts')->getRandomText(); } }
And in template: echo $sf_user->Test()->getTresc(); Thx You :) I don't know You - You are new user this forum ? :) On 19 Mar, 19:07, xplo <xplo...@gmail.com> wrote: > You can acces to the request object in the object and set and > attribute with your random value. > It should work but i have no idea if it s considered good practice to > create a filter for that ^^; > > You could also create a method in myUser class and call it with > $sf_user in the layout/template > > On Mar 19, 6:39 pm, alexmm <misiekaleksan...@gmail.com> wrote: > > > I want to make query: > > $this->text = Doctrine::getTable('Texts')->getRandomText(); > > before each action. And in view use: > > echo $text->getText(); > > > How can I make this query before each action and pass result to view ? > > Only solution is to use preExecute() function in each module with this > > query ? Or maybe I should make this query in filter class but how can > > I pass then result to view ? > > -- 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 symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en To unsubscribe from this group, send email to symfony-users+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.