Bug #4638

Refactor flash message implementation to use session scope

Added by Sebastian Kurfuerst almost 6 years ago. Updated almost 5 years ago.

Status:Resolved Start date:2009-09-15
Priority:Should have Due date:
Assigned To:Sebastian Kurfuerst % Done:

100%

Category:-
Target version:-
PHP Version: Complexity:
Has patch: Affected Flow version:

Description

We should move flash message handling from AbstractController to some separate object which is in the session scope and thus automatically persisted.
Additionally, this object can be put into the ControllerContext, so the API inside the Templates is nicer.

Associated revisions

Revision 22fd15cf
Added by Sebastian Kurfuerst almost 6 years ago

[!!!][~FEATURE] FLOW3 (MVC): Improved the way flash messages are handled. Now there is a separate "FlashMessages" object which encapsulates handling the flash messages. This removes $this->pushFlashMessage and $this->popFlashMessages inside the Controller and {flashMessages} inside Fluid Template. PLEASE UPGRADE by replacing "$this->pushFlashMessage(" with "$this->flashMessages->add(" inside your Controllers, and use <f:renderFlashMessages /> instead of the custom for loop inside your templates. Note: You can set a custom CSS class for outputting flash messages by using <f:renderFlashMessages class="..." /> inside your templates. Resolves #4638.

History

#1 Updated by Sebastian Kurfuerst almost 6 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r3175.

Also available in: Atom PDF