Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Public Attributes | List of all members
popup_action Class Reference
Inheritance diagram for popup_action:
component_action templatable

Public Member Functions

 __construct ($event, $url, $name='popup', $params=array())
 Constructor. More...
 
 export_for_template (renderer_base $output)
 Export for template. More...
 
 get_js_options ()
 Returns a string of concatenated option->value pairs used by JS to call the popup window, based on this object's variables. More...
 

Public Attributes

string $event
 $event The DOM event that will trigger this action when caught
 
string $jsfunction = 'openpopup'
 The JS function to call for the popup.
 
array $jsfunctionargs = array()
 An array of arguments to pass to the JS function.
 
array $params
 An array of parameters that will be passed to the openpopup JS function. More...
 

Constructor & Destructor Documentation

◆ __construct()

popup_action::__construct (   $event,
  $url,
  $name = 'popup',
  $params = array() 
)

Constructor.

Parameters
string$eventDOM event
moodle_url | string$urlA moodle_url object, required if no jsfunction is given
string$nameThe JS function to call for the popup (default 'popup')
array$paramsAn array of popup parameters

Member Function Documentation

◆ export_for_template()

component_action::export_for_template ( renderer_base  $output)
inherited

Export for template.

Parameters
renderer_base$outputThe renderer.
Return values
stdClass

Implements templatable.

◆ get_js_options()

popup_action::get_js_options ( )

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

Return values
stringString of option->value pairs for JS popup function.

Member Data Documentation

◆ $params

array popup_action::$params
Initial value:
= array(
'height' => 400,
'width' => 500,
'top' => 0,
'left' => 0,
'menubar' => false,
'location' => false,
'scrollbars' => true,
'resizable' => true,
'toolbar' => true,
'status' => true,
'directories' => false,
'fullscreen' => false,
'dependent' => true)

An array of parameters that will be passed to the openpopup JS function.


The documentation for this class was generated from the following file: