Yes, but flash attributes don't have a namespace...
You can't for instance easily have multiple errors, of different
types, on the same page...
If ($request->hasErrors()) {
foreach($request->getErrorNames() as $error) {
echo "<div class='$error'>" . $request->getError($error) . "</
div>";
}
}
(where error names could be alert, warning, error, urgent, overdue,
etc...)
Somebody care to show me something as clean and concise using flash
attributes?
On 19 Nov 2008, at 19:10, olivierb wrote:
>
> I've just run into the same problem. I think I'm going to try Flash
> attributes.
>
> http://www.symfony-project.org/book/1_1/06-Inside-the-Controller-Layer#Flash
> Attributes
>
> Good luck.
> Olivier
>
>> Hi all,
>>
>> Just reading the Symfony 1.1 docs, and it says that this
>> functionality
>> only works with COMPAT_10 defined...
>>
>> Just wondering why it was removed? and what it's replacement is, if
>> any?
>>
>> I found it quite handy for feeding back non-critical and non-fatal
>> error messages to the user (things like errors generated by Swift or
>> other 3rd party libraries).
>>
>> At the moment I've enabled COMPAT_10, but I'd like to know if there
>> is
>> a better way of using this functionality in Symfony 1.1
>>
>> Cheers
>>
>> Lee
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---