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

Public Member Functions

 __construct (moodle_url $url, $label, $method= 'post')
 require_yui_module ($modules, $function, array $arguments=null, $galleryversion= '2010.04.08-12-35', $ondomready=false)
 require_js_init_call ($function, array $extraarguments=null, $ondomready=false, array $module=null)
 strings_for_js ($identifiers, $component= 'moodle', $a=null)
 initialise_js (moodle_page $page)

Protected Attributes

 $jsyuimodules = array()
 $jsinitcalls = array()
 $jsstrings = array()

Detailed Description

A button that is used to enrol users in a course

Definition at line 1002 of file locallib.php.


Constructor & Destructor Documentation

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

Initialises the new enrol_user_button

int $count The number of enrol user buttons already created

Parameters:
moodle_url$url
string$labelThe text to display in the button
string$methodEither post or get

Reimplemented from single_button.

Definition at line 1030 of file locallib.php.


Member Function Documentation

Initialises the JS that is required by this button

Parameters:
moodle_page$page

Definition at line 1094 of file locallib.php.

Here is the caller graph for this function:

require_js_init_call ( function,
array extraarguments = null,
ondomready = false,
array module = null 
)

Adds a JS initialisation call to the page when the button is used.

Parameters:
string$functionThe function to call
array$extraargumentsAn array of arguments to pass to the function
bool$ondomreadyIf true the call is postponed until the DOM is finished loading
array$moduleA module definition

Definition at line 1065 of file locallib.php.

require_yui_module ( modules,
function,
array arguments = null,
galleryversion = '2010.04.08-12-35',
ondomready = false 
)

Adds a YUI module call that will be added to the page when the button is used.

Parameters:
string | array$modulesOne or more modules to require
string$functionThe JS function to call
array$argumentsAn array of arguments to pass to the function
string$galleryversionThe YUI gallery version of any modules required
bool$ondomreadyIf true the call is postponed until the DOM is finished loading

Definition at line 1047 of file locallib.php.

strings_for_js ( identifiers,
component = 'moodle',
a = null 
)

Requires strings for JS that will be loaded when the button is used.

Parameters:
type$identifiers
string$component
mixed$a

Definition at line 1081 of file locallib.php.


Field Documentation

$jsinitcalls = array() [protected]

Definition at line 1014 of file locallib.php.

$jsstrings = array() [protected]

Definition at line 1020 of file locallib.php.

$jsyuimodules = array() [protected]

Definition at line 1008 of file locallib.php.


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