[TYPO3-50-general] Flash message API

Martin Kutschker masi-no at spam-typo3.org
Mon Jul 20 10:24:37 CEST 2009


Robert Lemke schrieb:
> Hi Ingo,
> 
> Am 19.07.2009 um 22:56 schrieb Ingo Renner:
> 
>>> 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.
> 
> Hmm, the template class pushes new messages onto the message stack? I think
> that really is the responsibility of the controller. And if so, the pop
> method should be located in the same class.

The template class is already filled with many features and it's
definitely no controller.

> Anyway, if it really makes sense, we could extract the whole flash
> messaging
> mechanism into its own class acting as a service. But currently for me it
> seems unnecessary.

If you don't see the need for a separate class in the v4 context I
suggest to create a new BE module base class that incorporates that feature.

Masi


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