FlashMessagesViewHelper extends AbstractViewHelper uses CompileWithRenderStatic

ViewHelper

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 (if there are any) as an unsorted list.

In case you need custom Flash Message HTML output, please write your own ViewHelper for the moment.

Examples

Simple

::

<f:flashMessages />

A list of flash messages.

TYPO3 core style

::

<f:flashMessages />

Output::

Info - Title for Info message

Message text here.

Output flash messages as a description list

::

<f:flashMessages as="flashMessages">

<f:for each="{flashMessages}" as="flashMessage">
{flashMessage.code}
{flashMessage.message}
</f:for>
</f:flashMessages>

Output::

1013
Some Warning Message.

Using a specific queue

::

<f:flashMessages queueIdentifier="myQueue" />

Table of Contents

Properties

$escapeOutput  : bool
ViewHelper outputs HTML therefore output escaping has to be disabled

Methods

initializeArguments()  : mixed
Initialize arguments
renderStatic()  : mixed
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()

Initialize arguments

public initializeArguments() : mixed

renderStatic()

Renders FlashMessages and flushes the FlashMessage queue

public static renderStatic(array<string|int, mixed> $arguments, Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) : mixed

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.

Parameters
$arguments : array<string|int, mixed>
$renderChildrenClosure : Closure
$renderingContext : RenderingContextInterface

        
On this page

Search results