Moodle  2.2.1
http://www.collinsharper.com
workshop_message Class Reference
Inheritance diagram for workshop_message:
Collaboration diagram for workshop_message:

Public Member Functions

 __construct ($text=null, $type=self::TYPE_INFO)
 set_text ($text)
 set_type ($type=self::TYPE_INFO)
 set_action (moodle_url $url, $label)
 get_message ()
 get_type ()
 get_action_url ()
 get_action_label ()

Data Fields

const TYPE_INFO = 10
const TYPE_OK = 20
const TYPE_ERROR = 30

Protected Attributes

 $text = ''
 $type = self::TYPE_INFO
 $actionurl = null
 $actionlabel = ''

Detailed Description

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()

Definition at line 2920 of file locallib.php.


Constructor & Destructor Documentation

__construct ( text = null,
type = self::TYPE_INFO 
)
Parameters:
string$textshort text to be displayed
string$typeoptional message type info|ok|error

Definition at line 2939 of file locallib.php.

Here is the call graph for this function:


Member Function Documentation

Returns action label

Returns:
string

Definition at line 3009 of file locallib.php.

Here is the caller graph for this function:

Returns action URL

Returns:
moodle_url|null

Definition at line 3000 of file locallib.php.

Here is the caller graph for this function:

Returns message text with HTML tags quoted

Returns:
string

Definition at line 2982 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

get_type ( )

Returns message type

Returns:
int

Definition at line 2991 of file locallib.php.

Here is the caller graph for this function:

set_action ( moodle_url url,
label 
)

Sets the optional message action

Parameters:
moodle_url$urlto follow on action
string$labelaction label

Definition at line 2972 of file locallib.php.

set_text ( text)

Sets the message text

Parameters:
string$textshort text to be displayed

Definition at line 2949 of file locallib.php.

Here is the caller graph for this function:

set_type ( type = self::TYPE_INFO)

Sets the message type

Parameters:
int$type

Definition at line 2958 of file locallib.php.

Here is the caller graph for this function:


Field Documentation

$actionlabel = '' [protected]

Definition at line 2933 of file locallib.php.

$actionurl = null [protected]

Definition at line 2931 of file locallib.php.

$text = '' [protected]

Definition at line 2927 of file locallib.php.

$type = self::TYPE_INFO [protected]

Definition at line 2929 of file locallib.php.

const TYPE_ERROR = 30

Definition at line 2924 of file locallib.php.

const TYPE_INFO = 10

Definition at line 2922 of file locallib.php.

const TYPE_OK = 20

Definition at line 2923 of file locallib.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations