symfony/symfony — pull request #2543 by drak (2011-11-02 10:38:12+00:00)
Title: Improve flash messages (replaces PR #2510)

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: 1863, 2510

Adds a "type" parameter for flash messages. By default, status messages are placed in the "status" bucket, but type could be 'error', 'warning', etc. An addFlash() method is also added to easily add flash messages without needing to specify a type or a name.

NB This PR replaces #2510, that is, it integrates the original PR plus all the comments in the thread.