Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
tool_admin_presets\local\action\base Class Reference
Inheritance diagram for tool_admin_presets\local\action\base:
tool_admin_presets\local\action\delete tool_admin_presets\local\action\export tool_admin_presets\local\action\import tool_admin_presets\local\action\load tool_admin_presets\local\action\rollback

Public Member Functions

 __construct ()
 Loads common class attributes.
 
 display ()
 Main display method.
 
 log ()
 Trigger an event based on the current action.
 
 show ()
 Method to list the presets available on the system.
 

Protected Member Functions

 display_header ()
 Displays the header.
 
 get_explanatory_description ()
 Get explanatory description to be displayed below the heading.
 
 get_title ()
 Get page title for this action.
 

Protected Attributes

string $action
 The main action (delete, export, import, load...).
 
int $id
 Admin preset identifier.
 
manager $manager
 The manager helper class instance.
 
string $mode
 The mode (show, execute...).
 
moodleform $moodleform
 The moodle form to display in the page.
 
int $outputs
 The output content to display in the page.
 

Static Protected Attributes

static array $eventsactionsmap
 Array map for the events.
 

Member Function Documentation

◆ display()

tool_admin_presets\local\action\base::display ( )

Main display method.

Prints the block header and the common block outputs, the selected action outputs, his form and the footer

$outputs value depends on $mode and $action selected

◆ get_explanatory_description()

tool_admin_presets\local\action\base::get_explanatory_description ( )
protected

Get explanatory description to be displayed below the heading.

It's optional and might change depending on the action and the mode.

Return values
string|nullThe explanatory description for the current action and mode.

Reimplemented in tool_admin_presets\local\action\export, tool_admin_presets\local\action\import, tool_admin_presets\local\action\load, and tool_admin_presets\local\action\rollback.

◆ get_title()

tool_admin_presets\local\action\base::get_title ( )
protected

Get page title for this action.

Return values
stringThe page title to display into the page.

Reimplemented in tool_admin_presets\local\action\rollback.

◆ log()

tool_admin_presets\local\action\base::log ( )

Trigger an event based on the current action.

Return values
void

◆ show()

tool_admin_presets\local\action\base::show ( )

Method to list the presets available on the system.

It allows users to access the different preset actions (preview, load, download, delete and rollback)

Reimplemented in tool_admin_presets\local\action\delete, tool_admin_presets\local\action\export, tool_admin_presets\local\action\import, tool_admin_presets\local\action\load, and tool_admin_presets\local\action\rollback.

Member Data Documentation

◆ $eventsactionsmap

array tool_admin_presets\local\action\base::$eventsactionsmap
staticprotected
Initial value:
= [
'base' => 'presets_listed',
'delete' => 'preset_deleted',
'export' => 'preset_exported',
'import' => 'preset_imported',
'preview' => 'preset_previewed',
'load' => 'preset_loaded',
'rollback' => 'preset_reverted',
'download_xml' => 'preset_downloaded'
]

Array map for the events.


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