[TYPO3-50-general] Flash message API

Ingo Renner ingo at typo3.org
Sun Jul 19 22:56:59 CEST 2009


Robert Lemke wrote:

Hi Robert,

>> - an API to manage a message queue.
>>
>> The latter is of course far more interesting. Are flash messages managed
>> just generally? Can they be tagged to be displayed only in certain
>> places? Can they be stored in session, so that messages can be passed
>> from one script to another in case of redirections? If yes, how is
>> flushing managed?
>
> Flash messages are stored in a session. Adding a new message is a matter of
> the following call within your controller:
>
> $this->pushFlashMessage($message);
>
> On each request the controller will automatically pop all messages from the
> stack and assign them to the "flashMassages" variable in the Fluid
> template.
> Therefore all messages are cleared on the next request, even if you don't
> display them. The popFlashMessages() method is not intended to be used by
> the user / developer.

sounds good to me, however I guess that in the case of v4 it wouldn't be 
the controller to call the methods on, but rather the template class or 
a distinct flash message handler.


best
Ingo

-- 
Ingo Renner
TYPO3 Core Developer, Release Manager TYPO3 4.2



More information about the TYPO3-project-5_0-general mailing list