Elgg System Message.
More...
Elgg System Message.
Holds information about a single system message.
- Since
- 4.2.0
Definition at line 10 of file ElggSystemMessage.php.
ElggSystemMessage::__construct |
( |
string |
$message, |
|
|
string |
$type = 'success' |
|
) |
| |
constructor
- Parameters
-
string | $message | Message text |
string | $type | Message type |
Definition at line 43 of file ElggSystemMessage.php.
ElggSystemMessage::__toString |
( |
| ) |
|
This magic method is used for setting a string value for the object.
It will be used if the object is used as a string.
- Returns
- string
Definition at line 153 of file ElggSystemMessage.php.
array additional variables set in the ElggSystemMessage::factory |
( |
array |
$options | ) |
|
|
static |
Create an ElggSystemMessage from an associative array.
Required key is 'message'.
Commonly used params: type => STR Message type (required) message => STR Message text ttl => INT Time to live before the message is hidden link => STR Additional html to show in the message as an action related to the message
Additional vars are stored in message vars (retrievable with getVars)
- Parameters
-
array | $options | Option array of key value pairs |
- Returns
Definition at line 63 of file ElggSystemMessage.php.
ElggSystemMessage::getMessage |
( |
| ) |
|
ElggSystemMessage::getTtl |
( |
| ) |
|
ElggSystemMessage::getType |
( |
| ) |
|
ElggSystemMessage::getVars |
( |
array |
$extras = [] | ) |
|
Returns the extra vars set during the factory.
- Parameters
-
array | $extras | additional vars to merge into the vars |
- Returns
- array
Definition at line 144 of file ElggSystemMessage.php.
ElggSystemMessage::setMessage |
( |
string |
$message | ) |
|
Set the message.
- Parameters
-
string | $message | message text |
- Returns
- void
Definition at line 85 of file ElggSystemMessage.php.
ElggSystemMessage::setTtl |
( |
int |
$ttl | ) |
|
Set the time to live.
- Parameters
-
int | $ttl | number of seconds before autohide |
- Returns
- void
Definition at line 124 of file ElggSystemMessage.php.
ElggSystemMessage::setType |
( |
string |
$type | ) |
|
ElggSystemMessage::$link = '' |
|
protected |
ElggSystemMessage::$message |
|
protected |
ElggSystemMessage::$ttl = -1 |
|
protected |
ElggSystemMessage::$vars = [] |
|
protected |
The documentation for this class was generated from the following file: