FlashMessageContainer
class FlashMessageContainer (View source)
internal | You should not interact with this object directly, use the FlashMessageService instead or the addFlashMessage() method when in an AbstractController implementation |
This is a container for all Flash Messages.
Properties
protected array | $messages |
Methods
void
bool
hasMessages()
Whether there are any messages in the FlashMessageContainer
Message[]
getMessages(string $severity = null)
Returns all currently stored flash messages.
void
flush(string $severity = null)
Remove messages from this container.
Message[]
getMessagesAndFlush(string $severity = null)
Get all flash messages (with given severity) currently available and remove them from the container.
Details
void
addMessage(Message $message)
Add a flash message object.
bool
hasMessages()
Whether there are any messages in the FlashMessageContainer
Message[]
getMessages(string $severity = null)
Returns all currently stored flash messages.
void
flush(string $severity = null)
Remove messages from this container.
Message[]
getMessagesAndFlush(string $severity = null)
Get all flash messages (with given severity) currently available and remove them from the container.