ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
class.ilSystemStyleMessage.php
Go to the documentation of this file.
1
<?
php
8
class
ilSystemStyleMessage
9
{
10
const
TYPE_INFO
= 0;
11
const
TYPE_SUCCESS
= 1;
12
const
TYPE_ERROR
= 2;
13
17
protected
$message
=
""
;
18
22
protected
$type_id
= self::TYPE_SUCCESS;
23
29
public
function
__construct
(
$message
,
$type_id
= self::TYPE_SUCCESS)
30
{
31
$this->
setMessage
(
$message
);
32
$this->
setTypeId
(
$type_id
);
33
}
34
35
39
public
function
getMessageOutput
()
40
{
41
return
$this->message .
"</br>"
;
42
}
43
47
public
function
getMessage
()
48
{
49
return
$this->message
;
50
}
51
55
public
function
setMessage
(
$message
)
56
{
57
$this->message =
$message
;
58
}
59
63
public
function
getTypeId
()
64
{
65
return
$this->type_id
;
66
}
67
72
public
function
setTypeId
(
$type_id
)
73
{
74
if
($this->
isValidTypeId
(
$type_id
)) {
75
$this->type_id =
$type_id
;
76
}
else
{
77
throw
new
ilSystemStyleMessageStackException
(
ilSystemStyleMessageStackException::MESSAGE_STACK_TYPE_ID_DOES_NOT_EXIST
);
78
}
79
}
80
81
protected
function
isValidTypeId
(
$type_id
)
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
}
92
}
ilSystemStyleMessageStackException
Class for advanced editing exception handling in ILIAS.
Definition:
class.ilSystemStyleMessageStackException.php:13
ilSystemStyleMessageStackException\MESSAGE_STACK_TYPE_ID_DOES_NOT_EXIST
const MESSAGE_STACK_TYPE_ID_DOES_NOT_EXIST
Definition:
class.ilSystemStyleMessageStackException.php:15
ilSystemStyleMessage\$type_id
$type_id
Definition:
class.ilSystemStyleMessage.php:22
ilSystemStyleMessage\isValidTypeId
isValidTypeId($type_id)
Definition:
class.ilSystemStyleMessage.php:81
ilSystemStyleMessage\$message
$message
Definition:
class.ilSystemStyleMessage.php:17
ilSystemStyleMessage\getMessageOutput
getMessageOutput()
Definition:
class.ilSystemStyleMessage.php:39
ilSystemStyleMessage
Message for the user.
Definition:
class.ilSystemStyleMessage.php:8
ilSystemStyleMessage\__construct
__construct($message, $type_id=self::TYPE_SUCCESS)
ilMessageStack constructor.
Definition:
class.ilSystemStyleMessage.php:29
ilSystemStyleMessage\setMessage
setMessage($message)
Definition:
class.ilSystemStyleMessage.php:55
ilSystemStyleMessage\getTypeId
getTypeId()
Definition:
class.ilSystemStyleMessage.php:63
ilSystemStyleMessage\setTypeId
setTypeId($type_id)
Definition:
class.ilSystemStyleMessage.php:72
TYPE_ERROR
const TYPE_ERROR
Definition:
langcheck.php:50
ilSystemStyleMessage\TYPE_ERROR
const TYPE_ERROR
Definition:
class.ilSystemStyleMessage.php:12
ilSystemStyleMessage\TYPE_INFO
const TYPE_INFO
Definition:
class.ilSystemStyleMessage.php:10
php
ilSystemStyleMessage\getMessage
getMessage()
Definition:
class.ilSystemStyleMessage.php:47
ilSystemStyleMessage\TYPE_SUCCESS
const TYPE_SUCCESS
Definition:
class.ilSystemStyleMessage.php:11
Services
Style
System
classes
Utilities
class.ilSystemStyleMessage.php
Generated on Thu Jan 30 2025 19:02:05 for ILIAS by
1.8.13 (using
Doxyfile
)