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.
 
◆ __construct()
      
        
          | ElggSystemMessage::__construct  | 
          ( | 
          string  | 
          $message,  | 
        
        
           | 
           | 
          string  | 
          $type = 'success'  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
\ElggSystemMessage constructor 
- Parameters
 - 
  
    | string | $message | Message text  | 
    | string | $type | Message type  | 
  
   
Definition at line 43 of file ElggSystemMessage.php.
 
 
◆ __toString()
      
        
          | 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.
 
 
◆ factory()
  
  
      
        
          | 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
 - \ElggSystemMessage 
 
Definition at line 63 of file ElggSystemMessage.php.
 
 
◆ getMessage()
      
        
          | ElggSystemMessage::getMessage  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ getTtl()
      
        
          | ElggSystemMessage::getTtl  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ getType()
      
        
          | ElggSystemMessage::getType  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ getVars()
      
        
          | 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.
 
 
◆ setMessage()
      
        
          | ElggSystemMessage::setMessage  | 
          ( | 
          string  | 
          $message | ) | 
           | 
        
      
 
Set the message. 
- Parameters
 - 
  
    | string | $message | message text  | 
  
   
- Returns
 - void 
 
Definition at line 85 of file ElggSystemMessage.php.
 
 
◆ setTtl()
      
        
          | 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.
 
 
◆ setType()
      
        
          | ElggSystemMessage::setType  | 
          ( | 
          string  | 
          $type | ) | 
           | 
        
      
 
 
◆ $link
  
  
      
        
          | ElggSystemMessage::$link = '' | 
         
       
   | 
  
protected   | 
  
 
 
◆ $message
  
  
      
        
          | ElggSystemMessage::$message | 
         
       
   | 
  
protected   | 
  
 
 
◆ $ttl
  
  
      
        
          | ElggSystemMessage::$ttl = -1 | 
         
       
   | 
  
protected   | 
  
 
 
◆ $type
◆ $vars
  
  
      
        
          | ElggSystemMessage::$vars = [] | 
         
       
   | 
  
protected   | 
  
 
 
The documentation for this class was generated from the following file: