Hello, I think flash messages must be issued by the controller to inquire about the status of the process. However, it is the responsibility of the integrator to display a message to the user's eyes. Internationalization should also be taken into account.
Maybe it would be interesting to create a management system based on a flashes registry (another configuration file). Thus, the controller simply pass the key of the wanted flash message. In the template side, a helper would display the message corresponding to a specified key. regards, Antoine 2010/10/22 Lukas Kahwe Smith <[email protected]> > Hi, > > During the work on twigyfing DoctrineUserBundle we stumbled over another > thing that made us wonder: > > http://github.com/liip/DoctrineUserBundle/blob/master/Resources/views/User/show_content.twig > > {% if _view.session.hasFlash('doctrine_user_user_create/success') %} > <div class="doctrine_user_user_create_success"> > {% trans 'The user has been created successfully' from > DoctrineUserBundle %} > </div> > {% endif %} > > The flash messages are actually just keys with true: > $this['session']->setFlash('doctrine_user_group_create/success', true); > > I can see how this makes sense in the way that it keeps text out of the > controllers. Then again the question is if it makes sense to have actual > text anyway rather than simply a unique key to use for the look up in the > translation system. That way it is easier to also just have some generic > handler for flash messages that is placed into the layout template. > > regards, > Lukas Kahwe Smith > [email protected] > > > > -- > 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]<symfony-devs%[email protected]> > For more options, visit this group at > http://groups.google.com/group/symfony-devs?hl=en > -- 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
