Please don't forget, that above you have a very simple flash message.
In my apps flash messages usualy have parameters, and all those will
need to be passed to the view just for the sake of formatting a flash.
I'm already smelling problems here, as one would easily forget to pass
some params to view when refactoring app.

Regards,
Miha
On Oct 22, 11:24 am, Lukas Kahwe Smith <[email protected]> wrote:
> On 22.10.2010, at 10:27, Lukas Kahwe Smith wrote:
>
>
>
>
>
> > On 22.10.2010, at 10:21, Antoine Hérault wrote:
>
> >> 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.
>
> > right .. this is what i was indirectly proposing
>
> > to me the following is fine:
> > $this['session']->setFlash('doctrine_user_group_create/success', true);
>
> > and then i would expect to rather see a for loop over all the flash 
> > messages set, using the key of each of the flash messages as a lookup in 
> > the translation system. not sure if there is a way to loop over flash 
> > messages yet, so consider this pseudo code:
> > {% for msg in flashes %}
> >   {% trans $msg from XXX %}
> > {% endfor %}
>
> > for the XXX i am not sure how to best associate the given flash message to 
> > a catalog. maybe it should be the value of the flash message? but then 
> > things get a bit confusing or rather it seems we are taking the flash 
> > system in a totally different direction than in symfony1
>
> > $this['session']->setFlash('doctrine_user_group_create/success', 
> > 'DoctrineUserBundle');
>
> thought about this some more.
>
> not using the current API the requirements form my POV:
> basically i think setting a flash message should consist of a catalog name 
> (maybe optional) and a translation key. there needs to be a way to find an 
> indiviual flash message and there also needs to be a way to iterate over all 
> of them.
>
> for those who do not want to use the translation system at all there should 
> maybe be a fallback
>
> 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