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
Methods
- render() : string
- Render method
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