[[Dashboard | << Back to Dashboard ]]
{| align="right"
| __TOC__
|}
= Exploring the MessageBox Plugin =
== Overview ==
This is the MessageBox plugin. It uses the session/client scope to save messages.
== info ==
Facade to setmessage with info type
=== Returns ===
* This function returns ''void''
=== Arguments ===
{| cellpadding="5", class="tablelisting"
! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description'''
|-
| message || string || No || || The message to show.
|-
| messageArray || Array || No || --- || You can also send in an array of messages to render separated by a
|}
=== Examples ===
== isEmpty ==
Checks wether the MessageBox is empty or not.
=== Returns ===
* This function returns ''boolean''
=== Examples ===
== error ==
Facade to setmessage with error type
=== Returns ===
* This function returns ''void''
=== Arguments ===
{| cellpadding="5", class="tablelisting"
! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description'''
|-
| message || string || No || || The message to show.
|-
| messageArray || Array || No || --- || You can also send in an array of messages to render separated by a
|}
=== Examples ===
== setMessage ==
Create a new MessageBox. Look at types.
=== Returns ===
* This function returns ''void''
=== Arguments ===
{| cellpadding="5", class="tablelisting"
! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description'''
|-
| type || string || Yes || --- || The message type.Available types [error][warning][info]
|-
| message || string || No || || The message to show.
|-
| messageArray || Array || No || --- || You can also send in an array of messages to render separated by a
|}
=== Examples ===
== renderMessage ==
Renders a messagebox immediately for you with the passed in arguments
=== Returns ===
* This function returns ''any''
=== Arguments ===
{| cellpadding="5", class="tablelisting"
! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description'''
|-
| type || string || Yes || --- || The message type.Available types [error][warning][info]
|-
| message || string || No || || The message to show.
|-
| messageArray || Array || No || --- || You can also send in an array of messages to render separated by a
|}
=== Examples ===
== getMessage ==
Returns a structure of the message if it exists, else a blank structure.
=== Returns ===
* This function returns ''any''
=== Examples ===
== warn ==
Facade to setmessage with warning type
=== Returns ===
* This function returns ''void''
=== Arguments ===
{| cellpadding="5", class="tablelisting"
! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description'''
|-
| message || string || No || || The message to show.
|-
| messageArray || Array || No || --- || You can also send in an array of messages to render separated by a
|}
=== Examples ===
== renderit ==
Renders the message box and clears the message structure by default.
=== Returns ===
* This function returns ''any''
=== Arguments ===
{| cellpadding="5", class="tablelisting"
! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description'''
|-
| clearMessage || boolean || No || true || Flag to clear the message structure or not after rendering. Default is true.
|}
=== Examples ===
== clearMessage ==
Clears the message structure by deleting it from the session scope.
=== Returns ===
* This function returns ''void''
=== Examples ===
== appendArray ==
Append an array of messages to the MessageBox. If there is no message, then it sets the type to information.
=== Returns ===
* This function returns ''void''
=== Arguments ===
{| cellpadding="5", class="tablelisting"
! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description'''
|-
| messageArray || Array || Yes || --- || The array of messages to append. You must send that.
|}
=== Examples ===
== append ==
Append a message to the MessageBox. If there is no message, then it sets the type to information.
=== Returns ===
* This function returns ''void''
=== Arguments ===
{| cellpadding="5", class="tablelisting"
! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description'''
|-
| message || string || Yes || --- || The message to append, it does not include any breaks or delimiters. You must send that.
|}
=== Examples ===