ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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.

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.

Referenced by ilSystemStyleMessageTest\testGetMessageOutput().

40  {
41  return $this->message . "</br>";
42  }
+ Here is the caller graph for this function:

◆ getTypeId()

ilSystemStyleMessage::getTypeId ( )
Returns
int

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

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.

References $type_id, and TYPE_ERROR.

Referenced by setTypeId().

82  {
83  switch ($type_id) {
84  case self::TYPE_ERROR:
85  case self::TYPE_INFO:
86  case self::TYPE_SUCCESS:
87  return true;
88  default:
89  return false;
90  }
91  }
const TYPE_ERROR
Definition: langcheck.php:50
+ Here is the caller graph for this function:

◆ setMessage()

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

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

References $message.

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

56  {
57  $this->message = $message;
58  }
+ 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: