TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
FlashMessage Class Reference
Inheritance diagram for FlashMessage:
AbstractMessage

Public Member Functions

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

Protected Attributes

 $storeInSession = false
 
 $classes
 
 $icons
 
- Protected Attributes inherited from AbstractMessage
 $title = ''
 
 $message = ''
 
 $severity = self::OK
 

Additional Inherited Members

- Public Attributes inherited from 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 20 of file FlashMessage.php.

Constructor & Destructor Documentation

__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 59 of file FlashMessage.php.

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

Member Function Documentation

getClass ( )

Gets the message severity class name

Returns
string The message severity class name

Definition at line 93 of file FlashMessage.php.

References AbstractMessage\$severity.

Referenced by FlashMessage\getMessageAsMarkup().

getIconName ( )

Gets the message severity icon name

Returns
string The message severity icon name

Definition at line 103 of file FlashMessage.php.

References AbstractMessage\$severity.

Referenced by FlashMessage\getMessageAsMarkup().

getMessageAsMarkup ( )

Gets the message rendered as clean and secure markup

Returns
string

Definition at line 113 of file FlashMessage.php.

References FlashMessage\getClass(), FlashMessage\getIconName(), AbstractMessage\getMessage(), and AbstractMessage\getTitle().

isSessionMessage ( )

Gets the message's storeInSession flag.

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

Definition at line 72 of file FlashMessage.php.

References FlashMessage\$storeInSession.

setStoreInSession (   $storeInSession)

Sets the message's storeInSession flag

Parameters
bool$storeInSessionThe persistence flag
Returns
void

Definition at line 83 of file FlashMessage.php.

References FlashMessage\$storeInSession.

Referenced by FlashMessage\__construct().

Member Data Documentation

$classes
protected
Initial value:
= [
self::NOTICE => 'notice'

Definition at line 32 of file FlashMessage.php.

$icons
protected
Initial value:
= [
self::NOTICE => 'lightbulb-o'

Definition at line 43 of file FlashMessage.php.

$storeInSession = false
protected