TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Core\Messaging\FlashMessage Class Reference
Inheritance diagram for TYPO3\CMS\Core\Messaging\FlashMessage:
TYPO3\CMS\Core\Messaging\AbstractMessage

Public Member Functions

 __construct ($message, $title='', $severity=self::OK, $storeInSession=false)
 
 isSessionMessage ()
 
 setStoreInSession ($storeInSession)
 
 getClass ()
 
 getIconName ()
 
 render ()
 
- Public Member Functions inherited from TYPO3\CMS\Core\Messaging\AbstractMessage
 getTitle ()
 
 setTitle ($title)
 
 getMessage ()
 
 setMessage ($message)
 
 getSeverity ()
 
 setSeverity ($severity=self::OK)
 
 __toString ()
 

Protected Attributes

 $storeInSession = false
 
 $classes
 
 $icons
 
- Protected Attributes inherited from TYPO3\CMS\Core\Messaging\AbstractMessage
 $title = ''
 
 $message = ''
 
 $severity = self::OK
 

Additional Inherited Members

- Public Attributes inherited from TYPO3\CMS\Core\Messaging\AbstractMessage
const NOTICE = -2
 
const INFO = -1
 
const OK = 0
 
const WARNING = 1
 
const ERROR = 2
 

Detailed Description

A class representing flash messages.

Definition at line 22 of file FlashMessage.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Messaging\FlashMessage::__construct (   $message,
  $title = '',
  $severity = self::OK,
  $storeInSession = false 
)

Constructor for a flash message

Parameters
string$messageThe message.
string$titleOptional message title.
int$severityOptional severity, must be either of one of constants
bool$storeInSessionOptional, defines whether the message should be stored in the session or only for one request (default)

Definition at line 61 of file FlashMessage.php.

References TYPO3\CMS\Core\Messaging\AbstractMessage\$message, TYPO3\CMS\Core\Messaging\AbstractMessage\$severity, TYPO3\CMS\Core\Messaging\FlashMessage\$storeInSession, TYPO3\CMS\Core\Messaging\AbstractMessage\$title, TYPO3\CMS\Core\Messaging\AbstractMessage\setMessage(), TYPO3\CMS\Core\Messaging\AbstractMessage\setSeverity(), TYPO3\CMS\Core\Messaging\FlashMessage\setStoreInSession(), and TYPO3\CMS\Core\Messaging\AbstractMessage\setTitle().

Member Function Documentation

◆ getClass()

TYPO3\CMS\Core\Messaging\FlashMessage::getClass ( )

Gets the message severity class name

Returns
string The message severity class name

Definition at line 95 of file FlashMessage.php.

References TYPO3\CMS\Core\Messaging\AbstractMessage\$severity.

Referenced by TYPO3\CMS\Core\Messaging\FlashMessage\render().

◆ getIconName()

TYPO3\CMS\Core\Messaging\FlashMessage::getIconName ( )

Gets the message severity icon name

Returns
string The message severity icon name

Definition at line 105 of file FlashMessage.php.

References TYPO3\CMS\Core\Messaging\AbstractMessage\$severity.

Referenced by TYPO3\CMS\Core\Messaging\FlashMessage\render().

◆ isSessionMessage()

TYPO3\CMS\Core\Messaging\FlashMessage::isSessionMessage ( )

Gets the message's storeInSession flag.

Returns
bool TRUE if message should be stored in the session, otherwise FALSE.

Definition at line 74 of file FlashMessage.php.

References TYPO3\CMS\Core\Messaging\FlashMessage\$storeInSession.

◆ render()

TYPO3\CMS\Core\Messaging\FlashMessage::render ( )

◆ setStoreInSession()

TYPO3\CMS\Core\Messaging\FlashMessage::setStoreInSession (   $storeInSession)

Sets the message's storeInSession flag

Parameters
bool$storeInSessionThe persistence flag
Returns
void

Definition at line 85 of file FlashMessage.php.

References TYPO3\CMS\Core\Messaging\FlashMessage\$storeInSession.

Referenced by TYPO3\CMS\Core\Messaging\FlashMessage\__construct().

Member Data Documentation

◆ $classes

TYPO3\CMS\Core\Messaging\FlashMessage::$classes
protected
Initial value:
= [
self::NOTICE => 'notice'

Definition at line 34 of file FlashMessage.php.

◆ $icons

TYPO3\CMS\Core\Messaging\FlashMessage::$icons
protected
Initial value:
= [
self::NOTICE => 'lightbulb-o'

Definition at line 45 of file FlashMessage.php.

◆ $storeInSession

TYPO3\CMS\Core\Messaging\FlashMessage::$storeInSession = false
protected