‪TYPO3CMS  10.4
TYPO3\CMS\Core\Messaging\Renderer\PlaintextRenderer Class Reference
Inheritance diagram for TYPO3\CMS\Core\Messaging\Renderer\PlaintextRenderer:
TYPO3\CMS\Core\Messaging\Renderer\FlashMessageRendererInterface

Public Member Functions

string render (array $flashMessages)
 

Static Protected Attributes

static array $type
 

Detailed Description

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] <message>

Example: [ERROR] No record found

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

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

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

Definition at line 41 of file PlaintextRenderer.php.

Member Function Documentation

◆ render()

string TYPO3\CMS\Core\Messaging\Renderer\PlaintextRenderer::render ( array  $flashMessages)

Render method

Parameters
FlashMessage[]$flashMessages
Returns
‪string Representation of the flash message as plain text

Implements TYPO3\CMS\Core\Messaging\Renderer\FlashMessageRendererInterface.

Definition at line 60 of file PlaintextRenderer.php.

Member Data Documentation

◆ $type

array TYPO3\CMS\Core\Messaging\Renderer\PlaintextRenderer::$type
staticprotected
Initial value:
= array(
‪FlashMessage::OK => 'SUCCESS',
)

Message types

Definition at line 46 of file PlaintextRenderer.php.

‪TYPO3\CMS\Core\Messaging\AbstractMessage\WARNING
‪const WARNING
Definition: AbstractMessage.php:30
‪TYPO3\CMS\Core\Messaging\AbstractMessage\OK
‪const OK
Definition: AbstractMessage.php:29
‪TYPO3\CMS\Core\Messaging\AbstractMessage\INFO
‪const INFO
Definition: AbstractMessage.php:28
‪TYPO3\CMS\Core\Messaging\AbstractMessage\NOTICE
‪const NOTICE
Definition: AbstractMessage.php:27
‪TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR
‪const ERROR
Definition: AbstractMessage.php:31