FlashMessagesViewHelper extends AbstractViewHelper
This class is the implementation of a Fluid ViewHelper.
View this class in the TYPO3 ViewHelper reference: <f:flashmessages>
ViewHelper which renders the flash messages (output messages / message bubbles, which can also be queued from a preceding request). No output occurs if no flash messages are queued. Output is done with a hard-coded HTML definition, but the raw contents can be extracted via the `as` attribute, and rendered with custom formatting.
<f:flashMessages />
<f:flashMessages as="flashMessages">
<dl class="messages">
<f:for each="{flashMessages}" as="flashMessage">
<dt>{flashMessage.code}</dt>
<dd>{flashMessage.message}</dd>
</f:for>
</dl>
</f:flashMessages>
Tags
Table of Contents
Properties
- $escapeOutput : bool
- ViewHelper outputs HTML therefore output escaping has to be disabled
Methods
- initializeArguments() : void
- render() : string
- Renders FlashMessages and flushes the FlashMessage queue
Properties
$escapeOutput
ViewHelper outputs HTML therefore output escaping has to be disabled
protected
bool
$escapeOutput
= false
Methods
initializeArguments()
public
initializeArguments() : void
render()
Renders FlashMessages and flushes the FlashMessage queue
public
render() : string
Note: This does not disable the current page cache in order to prevent FlashMessage output from being cached. In case of conditional flash message rendering, caching must be disabled (e.g. for a controller action). Custom caching using the Caching Framework can be used in this case.