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]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to