PHP Class Neos\Flow\Mvc\FlashMessageContainer

ファイルを表示 Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Property Type Description
$messages array

Public Methods

Method Description
addMessage ( Neos\Error\Messages\Message $message ) : void Add a flash message object.
flush ( string $severity = null ) : void Remove messages from this container.
getMessages ( string $severity = null ) : array Returns all currently stored flash messages.
getMessagesAndFlush ( string $severity = null ) : array Get all flash messages (with given severity) currently available and remove them from the container.

Method Details

addMessage() public method

Add a flash message object.
public addMessage ( Neos\Error\Messages\Message $message ) : void
$message Neos\Error\Messages\Message
return void

flush() public method

Remove messages from this container.
public flush ( string $severity = null ) : void
$severity string severity of messages (from Message::SEVERITY_* constants) to remove.
return void

getMessages() public method

Returns all currently stored flash messages.
public getMessages ( string $severity = null ) : array
$severity string severity of messages (from Message::SEVERITY_* constants) to return.
return array

getMessagesAndFlush() public method

Get all flash messages (with given severity) currently available and remove them from the container.
public getMessagesAndFlush ( string $severity = null ) : array
$severity string severity of the messages (One of the Message::SEVERITY_* constants)
return array

Property Details

$messages protected_oe property

protected array $messages
return array