INFO
INFO
TriTan CMS Flash Messages Library
success(string $message, string $redirectUrl = null, boolean $sticky = false) : object
Add a success message
string | $message | The message text |
string | $redirectUrl | Where to redirect once the message is added |
boolean | $sticky | Sticky the message (hides the close button) |
warning(string $message, string $redirectUrl = null, boolean $sticky = false) : object
Add a warning message
string | $message | The message text |
string | $redirectUrl | Where to redirect once the message is added |
boolean | $sticky | Sticky the message (hides the close button) |
add(string $message, string $type = self::TYPE, string $redirectUrl = null, boolean $sticky = false) : object
Add a flash message to the session data
string | $message | The message text |
string | $type | The $msgType |
string | $redirectUrl | Where to redirect once the message is added |
boolean | $sticky | Whether or not the message is stickied |
display(mixed $types = null, boolean $print = true) : string
Display the flash messages
mixed | $types | (null) print all of the message types (array) print the given message types (string) print a single message type |
boolean | Whether to print the data or return it |
setMsgWrapper(string $msgWrapper = '') : object
Set the HTML that each message is wrapped in
string | $msgWrapper | The HTML that each message is wrapped in. Note: Two placeholders (%s) are expected. The first is the $msgCssClass, The second is the message text. |
setCssClassMap(mixed $msgType, mixed $cssClass = null) : object
Set the CSS classes for message types
mixed | $msgType | (string) The message type (array) key/value pairs for the class map |
mixed | $cssClass | (string) the CSS class to use (null) not used when $msgType is an array |