Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 402] [Versions 310 and 403]

Classes representing JS event handlers, used by output components. Please see http://docs.moodle.org/en/Developement:How_Moodle_outputs_HTML for an overview.

Copyright: 2009 Nicolas Connault
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 221 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 3 classes

component_action:: (2 methods):
  __construct()
  export_for_template()

confirm_action:: (1 method):
  __construct()

popup_action:: (2 methods):
  __construct()
  get_js_options()


Class: component_action  - X-Ref

Helper class used by other components that involve an action on the page (URL or JS).

__construct($event, $jsfunction, $jsfunctionargs=array()   X-Ref
Constructor

param: string $event DOM event
param: string $jsfunction An optional JS function. Required if jsfunctionargs is given
param: array $jsfunctionargs An array of arguments to pass to the jsfunction

export_for_template(renderer_base $output)   X-Ref
Export for template.

param: renderer_base $output The renderer.
return: stdClass

Class: confirm_action  - X-Ref

Confirm action

__construct($message, $callback = null, $continuelabel = null, $cancellabel = null)   X-Ref
Constructs the confirm action object

param: string $message The message to display to the user when they are shown
param: string $callback Deprecated since 2.7
param: string $continuelabel The string to use for he continue button
param: string $cancellabel The string to use for the cancel button

Class: popup_action  - X-Ref

Component action for a popup window.

__construct($event, $url, $name='popup', $params=array()   X-Ref
Constructor

param: string $event DOM event
param: moodle_url|string $url A moodle_url object, required if no jsfunction is given
param: string $name The JS function to call for the popup (default 'popup')
param: array  $params An array of popup parameters

get_js_options()   X-Ref
Returns a string of concatenated option->value pairs used by JS to call the popup window,
based on this object's variables

return: string String of option->value pairs for JS popup function.