|
Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
|
Renderable message to be displayed to the user. More...
Public Member Functions | |
| __construct ($text=null, $type=self::TYPE_INFO) | |
| get_action_label () | |
| Returns action label. More... | |
| get_action_url () | |
| Returns action URL. More... | |
| get_message () | |
| Returns message text with HTML tags quoted. More... | |
| get_type () | |
| Returns message type. More... | |
| set_action (moodle_url $url, $label) | |
| Sets the optional message action. More... | |
| set_text ($text) | |
| Sets the message text. More... | |
| set_type ($type=self::TYPE_INFO) | |
| Sets the message type. More... | |
Public Attributes | |
| const | TYPE_ERROR = 30 |
| const | TYPE_INFO = 10 |
| const | TYPE_OK = 20 |
Protected Attributes | |
| 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.
| workshop_message::__construct | ( | $text = null, |
|
$type = self::TYPE_INFO |
|||
| ) |
| string | $text | short text to be displayed |
| string | $type | optional message type info|ok|error |
| workshop_message::get_action_label | ( | ) |
Returns action label.
| string |
| workshop_message::get_action_url | ( | ) |
Returns action URL.
| moodle_url|null |
| workshop_message::get_message | ( | ) |
Returns message text with HTML tags quoted.
| string |
| workshop_message::get_type | ( | ) |
Returns message type.
| int |
| workshop_message::set_action | ( | moodle_url | $url, |
| $label | |||
| ) |
Sets the optional message action.
| moodle_url | $url | to follow on action |
| string | $label | action label |
| workshop_message::set_text | ( | $text | ) |
Sets the message text.
| string | $text | short text to be displayed |
| workshop_message::set_type | ( | $type = self::TYPE_INFO | ) |
Sets the message type.
| int | $type |