ILIAS  release_7 Revision v7.30-3-g800a261c036
ilSystemStyleMessage Class Reference

Message for the user. More...

+ Collaboration diagram for ilSystemStyleMessage:

Public Member Functions

 __construct ($message, $type_id=self::TYPE_SUCCESS)
 ilMessageStack constructor. More...
 
 getMessageOutput ()
 
 getMessage ()
 
 setMessage ($message)
 
 getTypeId ()
 
 setTypeId ($type_id)
 

Data Fields

const TYPE_INFO = 0
 
const TYPE_SUCCESS = 1
 
const TYPE_ERROR = 2
 

Protected Member Functions

 isValidTypeId ($type_id)
 

Protected Attributes

 $message = ""
 
 $type_id = self::TYPE_SUCCESS
 

Detailed Description

Message for the user.

Mostly they are stacked, to be shown on rendering to the user all at once.

Author
Timon Amstutz timon.nosp@m..ams.nosp@m.tutz@.nosp@m.ilub.nosp@m..unib.nosp@m.e.ch
Version
$Id$*

Definition at line 8 of file class.ilSystemStyleMessage.php.

Constructor & Destructor Documentation

◆ __construct()

ilSystemStyleMessage::__construct (   $message,
  $type_id = self::TYPE_SUCCESS 
)

ilMessageStack constructor.

Parameters
string$message
int$type_id

Definition at line 29 of file class.ilSystemStyleMessage.php.

References $message, $type_id, setMessage(), and setTypeId().

+ Here is the call graph for this function:

Member Function Documentation

◆ getMessage()

ilSystemStyleMessage::getMessage ( )
Returns
string

Definition at line 47 of file class.ilSystemStyleMessage.php.

48 {
49 return $this->message;
50 }

References $message.

Referenced by ilSystemStyleMessageTest\testConstructor(), and ilSystemStyleMessageTest\testGetAndSetMessage().

+ Here is the caller graph for this function:

◆ getMessageOutput()

ilSystemStyleMessage::getMessageOutput ( )
Returns
string

Definition at line 39 of file class.ilSystemStyleMessage.php.

40 {
41 return $this->message . "</br>";
42 }

Referenced by ilSystemStyleMessageTest\testGetMessageOutput().

+ Here is the caller graph for this function:

◆ getTypeId()

ilSystemStyleMessage::getTypeId ( )
Returns
int

Definition at line 63 of file class.ilSystemStyleMessage.php.

64 {
65 return $this->type_id;
66 }

References $type_id.

Referenced by ilSystemStyleMessageTest\testConstructor(), and ilSystemStyleMessageTest\testGetAndSetTypeID().

+ Here is the caller graph for this function:

◆ isValidTypeId()

ilSystemStyleMessage::isValidTypeId (   $type_id)
protected

Definition at line 81 of file class.ilSystemStyleMessage.php.

82 {
83 switch ($type_id) {
85 case self::TYPE_INFO:
87 return true;
88 default:
89 return false;
90 }
91 }

References $type_id, TYPE_ERROR, TYPE_INFO, and TYPE_SUCCESS.

Referenced by setTypeId().

+ Here is the caller graph for this function:

◆ setMessage()

ilSystemStyleMessage::setMessage (   $message)
Parameters
string$message

Definition at line 55 of file class.ilSystemStyleMessage.php.

56 {
57 $this->message = $message;
58 }

References $message.

Referenced by __construct(), and ilSystemStyleMessageTest\testGetAndSetMessage().

+ Here is the caller graph for this function:

◆ setTypeId()

ilSystemStyleMessage::setTypeId (   $type_id)
Parameters
$type_id
Exceptions
ilSystemStyleMessageStackException

Definition at line 72 of file class.ilSystemStyleMessage.php.

References $type_id, isValidTypeId(), and ilSystemStyleMessageStackException\MESSAGE_STACK_TYPE_ID_DOES_NOT_EXIST.

Referenced by __construct(), and ilSystemStyleMessageTest\testGetAndSetTypeID().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $message

ilSystemStyleMessage::$message = ""
protected

Definition at line 17 of file class.ilSystemStyleMessage.php.

Referenced by __construct(), getMessage(), and setMessage().

◆ $type_id

ilSystemStyleMessage::$type_id = self::TYPE_SUCCESS
protected

Definition at line 22 of file class.ilSystemStyleMessage.php.

Referenced by __construct(), getTypeId(), isValidTypeId(), and setTypeId().

◆ TYPE_ERROR

◆ TYPE_INFO

◆ TYPE_SUCCESS


The documentation for this class was generated from the following file: