Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
confirm_action Class Reference

Confirm action. More...

Inheritance diagram for confirm_action:
component_action templatable

Public Member Functions

 __construct ($message, $callback=null, $continuelabel=null, $cancellabel=null)
 Constructs the confirm action object.
 
 export_for_template (renderer_base $output)
 Export for template.
 

Public Attributes

string $event
 $event The DOM event that will trigger this action when caught
 
string $jsfunction = false
 A function name to call when the button is clicked The JS function you create must have two arguments:
 
array $jsfunctionargs = array()
 An array of arguments to pass to the JS function.
 

Detailed Description

Confirm action.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Since
Moodle 2.0

Constructor & Destructor Documentation

◆ __construct()

confirm_action::__construct ( $message,
$callback = null,
$continuelabel = null,
$cancellabel = null )

Constructs the confirm action object.

Parameters
string$messageThe message to display to the user when they are shown the confirm dialogue.
string$callbackDeprecated since 2.7
string$continuelabelThe string to use for he continue button
string$cancellabelThe string to use for the cancel button

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.

Member Data Documentation

◆ $jsfunction

string component_action::$jsfunction = false
inherited

A function name to call when the button is clicked The JS function you create must have two arguments:

  1. The event object
  2. An object/array of arguments ($jsfunctionargs)

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