PlaintextRenderer implements FlashMessageRendererInterface

A class representing a html flash message as plain text.

It is used in CLI context per default. The created output contains at least the severity and the message in the following format: [SEVERITY]

Example: [ERROR] No record found

In case the FlashMessage object contains also a title, the following format is used: [SEVERITY] <title>:

Example: [ERROR] An error occurred: No record found

Multiple messages are separated by a new line (LF).

Table of Contents

Interfaces

FlashMessageRendererInterface
Interface must be implemented by all flash message renderer classes

Properties

$type  : array<string|int, mixed>
Message types

Methods

render()  : string
Render method

Properties

$type

Message types

protected static array<string|int, mixed> $type = [\TYPO3\CMS\Core\Messaging\FlashMessage::NOTICE => 'NOTICE', \TYPO3\CMS\Core\Messaging\FlashMessage::INFO => 'INFO', \TYPO3\CMS\Core\Messaging\FlashMessage::OK => 'SUCCESS', \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING => 'WARNING', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR => 'DANGER']

Methods

render()

Render method

public render(array<string|int, FlashMessage$flashMessages) : string
Parameters
$flashMessages : array<string|int, FlashMessage>
Return values
string

Representation of the flash message as plain text


        
On this page

Search results