BootstrapRenderer

class \TYPO3\CMS\Core\Messaging\Renderer\BootstrapRenderer

Implements
FlashMessageRendererInterface

A class representing a bootstrap flash messages.

This class renders flash messages as markup, based on the bootstrap HTML/CSS framework. It is used in backend context. The created output contains all classes which are required for the TYPO3 backend. Any kind of message contains also a nice icon.

Table of Contents

Interfaces

FlashMessageRendererInterface
Interface must be implemented by all flash message renderer classes

Properties

$classes  : string[]
$icons  : string[]

Methods

render()  : string
Render method
getClass()  : string
Gets the message severity class name
getIconName()  : string
Gets the message severity icon name
getMessageAsMarkup()  : string
Gets the message rendered as clean and secure markup

Properties

$classes

protected static string[] $classes = [\TYPO3\CMS\Core\Messaging\FlashMessage::NOTICE => 'notice',…
Show the full value[\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']

The message severity class names

$icons

protected static string[] $icons = [\TYPO3\CMS\Core\Messaging\FlashMessage::NOTICE => 'lightbul…
Show the full value[\TYPO3\CMS\Core\Messaging\FlashMessage::NOTICE => 'lightbulb-o', \TYPO3\CMS\Core\Messaging\FlashMessage::INFO => 'info', \TYPO3\CMS\Core\Messaging\FlashMessage::OK => 'check', \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING => 'exclamation', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR => 'times']

The message severity icon names

Methods

render()

Render method

public render(FlashMessage[] $flashMessages) : string

Parameters

$flashMessages : FlashMessage[]

Return values

string —

Representation of the flash message

getClass()

Gets the message severity class name

protected getClass(FlashMessage $flashMessage) : string

Parameters

$flashMessage : FlashMessage

Return values

string —

The message severity class name

getIconName()

Gets the message severity icon name

protected getIconName(FlashMessage $flashMessage) : string

Parameters

$flashMessage : FlashMessage

Return values

string —

The message severity icon name

getMessageAsMarkup()

Gets the message rendered as clean and secure markup

protected getMessageAsMarkup(FlashMessage[] $flashMessages) : string

Parameters

$flashMessages : FlashMessage[]

Return values

string
On this page