A button that is used to enrol users in a course.
More...
|
| __construct (moodle_url $url, $label, $method='post') |
| Initialises the new enrol_user_button. More...
|
|
| add_action (component_action $action) |
| Add action to the button. More...
|
|
| add_confirm_action ($confirmmessage) |
| Shortcut for adding a JS confirm dialog when the button is clicked. More...
|
|
| export_for_template (renderer_base $output) |
| Export data. More...
|
|
| initialise_js (moodle_page $page) |
| Initialises the JS that is required by this button. More...
|
|
| 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. More...
|
|
| require_yui_module ($modules, $function, array $arguments=null, $galleryversion=null, $ondomready=false) |
| Adds a YUI module call that will be added to the page when the button is used. More...
|
|
| set_attribute ($name, $value) |
| Sets an attribute for the HTML button tag. More...
|
|
| strings_for_js ($identifiers, $component='moodle', $a=null) |
| Requires strings for JS that will be loaded when the button is used. More...
|
|
|
string | $actionid |
| Action id.
|
|
array | $actions = array() |
| List of attached actions.
|
|
string | $class = 'singlebutton' |
| Wrapping div class.
|
|
bool | $disabled = false |
| True if button disabled, false if normal.
|
|
string | $formid |
| Form id.
|
|
string | $label |
| Button label.
|
|
string | $method = 'post' |
| Form submit method post or get.
|
|
array | $params |
| $params URL Params
|
|
bool | $primary = false |
| True if button is primary button. More...
|
|
string | $tooltip = null |
| Button tooltip.
|
|
moodle_url | $url |
| Target url.
|
|
|
array | $attributes = [] |
|
array | $jsinitcalls = array() |
| An array containing JS initialisation calls required by this button.
|
|
array | $jsstrings = array() |
| An array strings required by JS for this button.
|
|
array | $jsyuimodules = array() |
| An array containing JS YUI modules required by this button.
|
|
A button that is used to enrol users in a course.
- Copyright
- 2010 Sam Hemelryk
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
enrol_user_button::__construct |
( |
moodle_url |
$url, |
|
|
|
$label, |
|
|
|
$method = 'post' |
|
) |
| |
Initialises the new enrol_user_button.
@staticvar int $count The number of enrol user buttons already created
- Parameters
-
moodle_url | $url | |
string | $label | The text to display in the button |
string | $method | Either post or get |
◆ add_action()
Add action to the button.
- Parameters
-
◆ add_confirm_action()
single_button::add_confirm_action |
( |
|
$confirmmessage | ) |
|
|
inherited |
Shortcut for adding a JS confirm dialog when the button is clicked.
The message must be a yes/no question.
- Parameters
-
string | $confirmmessage | The yes/no confirmation question. If "Yes" is clicked, the original action will occur. |
◆ export_for_template()
Export data.
- Parameters
-
- Return values
-
◆ initialise_js()
Initialises the JS that is required by this button.
- Parameters
-
◆ require_js_init_call()
enrol_user_button::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 | $function | The function to call |
array | $extraarguments | An array of arguments to pass to the function |
bool | $ondomready | If true the call is postponed until the DOM is finished loading |
array | $module | A module definition |
◆ require_yui_module()
enrol_user_button::require_yui_module |
( |
|
$modules, |
|
|
|
$function, |
|
|
array |
$arguments = null , |
|
|
|
$galleryversion = null , |
|
|
|
$ondomready = false |
|
) |
| |
Adds a YUI module call that will be added to the page when the button is used.
- Parameters
-
string | array | $modules | One or more modules to require |
string | $function | The JS function to call |
array | $arguments | An array of arguments to pass to the function |
string | $galleryversion | Deprecated: The gallery version to use |
bool | $ondomready | If true the call is postponed until the DOM is finished loading |
◆ set_attribute()
single_button::set_attribute |
( |
|
$name, |
|
|
|
$value |
|
) |
| |
|
inherited |
Sets an attribute for the HTML button tag.
- Parameters
-
string | $name | The attribute name |
mixed | $value | The value |
- Return values
-
◆ strings_for_js()
enrol_user_button::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 | |
◆ $primary
bool single_button::$primary = false |
|
inherited |
True if button is primary button.
Used for styling.
The documentation for this class was generated from the following file: