Renderable message to be displayed to the user.
More...
|
const | TYPE_ERROR = 30 |
|
const | TYPE_INFO = 10 |
|
const | TYPE_OK = 20 |
|
|
string | $actionlabel = '' |
|
moodle_url | $actionurl = null |
|
string | $text = '' |
|
int | $type = self::TYPE_INFO |
|
Renderable message to be displayed to the user.
Message can contain an optional action link with a label that is supposed to be rendered as a button or a link.
- See also
- workshop::renderer::render_workshop_message()
◆ __construct()
workshop_message::__construct |
( |
| $text = null, |
|
|
| $type = self::TYPE_INFO ) |
- Parameters
-
string | $text | short text to be displayed |
string | $type | optional message type info|ok|error |
◆ get_action_label()
workshop_message::get_action_label |
( |
| ) |
|
Returns action label.
- Return values
-
◆ get_action_url()
workshop_message::get_action_url |
( |
| ) |
|
Returns action URL.
- Return values
-
◆ get_message()
workshop_message::get_message |
( |
| ) |
|
Returns message text with HTML tags quoted.
- Return values
-
◆ get_type()
workshop_message::get_type |
( |
| ) |
|
Returns message type.
- Return values
-
◆ set_action()
workshop_message::set_action |
( |
moodle_url | $url, |
|
|
| $label ) |
Sets the optional message action.
- Parameters
-
moodle_url | $url | to follow on action |
string | $label | action label |
◆ set_text()
workshop_message::set_text |
( |
| $text | ) |
|
Sets the message text.
- Parameters
-
string | $text | short text to be displayed |
◆ set_type()
workshop_message::set_type |
( |
| $type = self::TYPE_INFO | ) |
|
Sets the message type.
- Parameters
-
The documentation for this class was generated from the following file:
- mod/workshop/locallib.php