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

Public Member Functions

 __construct (moodle_url $url, $label, $method='post')
 add_confirm_action ($confirmmessage)
 add_action (component_action $action)

Data Fields

 $url
 $label
 $method = 'post'
 $class = 'singlebutton'
 $disabled = false
 $tooltip = null
 $formid
 $actions = array()

Detailed Description

Data structure representing a simple form with only one button.

Since:
Moodle 2.0

Definition at line 506 of file outputcomponents.php.


Constructor & Destructor Documentation

__construct ( moodle_url url,
label,
method = 'post' 
)

Constructor

Parameters:
string | moodle_url$url
string$labelbutton text
string$methodget or post submit method

Reimplemented in enrol_user_button.

Definition at line 554 of file outputcomponents.php.


Member Function Documentation

Add action to the button.

Parameters:
component_action$action
Returns:
void

Definition at line 575 of file outputcomponents.php.

Here is the caller graph for this function:

add_confirm_action ( confirmmessage)

Shortcut for adding a JS confirm dialog when the button is clicked. The message must be a yes/no question.

Parameters:
string$messageThe yes/no confirmation question. If "Yes" is clicked, the original action will occur.
Returns:
void

Definition at line 566 of file outputcomponents.php.

Here is the call graph for this function:


Field Documentation

$actions = array()

Definition at line 546 of file outputcomponents.php.

$class = 'singlebutton'

Definition at line 526 of file outputcomponents.php.

$disabled = false

Definition at line 531 of file outputcomponents.php.

Definition at line 541 of file outputcomponents.php.

Definition at line 516 of file outputcomponents.php.

$method = 'post'

Definition at line 521 of file outputcomponents.php.

$tooltip = null

Definition at line 536 of file outputcomponents.php.

$url

Definition at line 511 of file outputcomponents.php.


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