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

Abstract stage class. More...

Inheritance diagram for restore_ui_stage:
base_ui_stage restore_ui_stage_process restore_ui_stage_review restore_ui_stage_schema restore_ui_stage_settings restore_ui_stage_complete

Public Member Functions

 __construct (restore_ui $ui, array $params=null)
 Constructor.
 
 display (core_backup_renderer $renderer)
 Displays the stage.
 
 get_name ()
 The name of this stage.
 
 get_next_stage ()
 The next stage.
 
 get_params ()
 Returns the custom params for this stage.
 
 get_prev_stage ()
 The previous stage.
 
 get_restoreid ()
 The restore id from the restore controller.
 
 get_stage ()
 The current stage.
 
 get_ui ()
 Returns the base UI class.
 
 get_uniqueid ()
 The backup id from the backup controller.
 
 has_sub_stages ()
 No sub stages for this stage.
 
 is_first_stage ()
 Returns true if this is the settings stage.
 
 is_independent ()
 This is an independent stage.
 
 process (base_moodleform $form=null)
 Processes the stage.
 

Protected Member Functions

 initialise_stage_form ()
 Creates an instance of the correct moodleform properly populated and all dependencies instantiated.
 

Protected Attributes

array $params = null
 Custom form params that will be added as hidden inputs.
 
int $stage = 1
 The current stage.
 
base_moodleform $stageform = null
 The moodleform for this stage.
 
base_ui $ui
 The backuck UI object.
 

Detailed Description

Abstract stage class.

This class should be extended by all restore stages (a requirement of many restore ui functions). Each stage must then define two abstract methods

  • process : To process the stage
  • initialise_stage_form : To get a restore_moodleform instance for the stage
License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

restore_ui_stage::__construct ( restore_ui $ui,
array $params = null )

Constructor.

Parameters
restore_ui$ui
array$params

Reimplemented in restore_ui_stage_schema, and restore_ui_stage_settings.

Member Function Documentation

◆ display()

base_ui_stage::display ( core_backup_renderer $renderer)
inherited

Displays the stage.

By default this involves instantiating the form for the stage and the calling it to display.

Parameters
core_backup_renderer$renderer
Return values
stringHTML code to echo

Reimplemented in backup_ui_stage_complete, backup_ui_stage_final, import_ui_stage_confirmation, restore_ui_stage_complete, and restore_ui_stage_process.

◆ get_name()

restore_ui_stage::get_name ( )
final

The name of this stage.

Return values
string

Reimplemented from base_ui_stage.

◆ get_next_stage()

base_ui_stage::get_next_stage ( )
inherited

The next stage.

Return values
int

Reimplemented in backup_ui_stage_initial, and import_ui_stage_precheck.

◆ get_params()

base_ui_stage::get_params ( )
finalinherited

Returns the custom params for this stage.

Return values
array|null

◆ get_prev_stage()

base_ui_stage::get_prev_stage ( )
finalinherited

The previous stage.

Return values
int

◆ get_restoreid()

restore_ui_stage::get_restoreid ( )
final

The restore id from the restore controller.

Return values
string

◆ get_stage()

base_ui_stage::get_stage ( )
finalinherited

The current stage.

Return values
int

◆ get_ui()

base_ui_stage::get_ui ( )
finalinherited

Returns the base UI class.

Return values
base_ui

◆ get_uniqueid()

base_ui_stage::get_uniqueid ( )
finalinherited

The backup id from the backup controller.

Return values
string

◆ has_sub_stages()

restore_ui_stage::has_sub_stages ( )

No sub stages for this stage.

Return values
false

Reimplemented in restore_ui_stage_process.

◆ initialise_stage_form()

base_ui_stage::initialise_stage_form ( )
abstractprotectedinherited

◆ is_first_stage()

restore_ui_stage::is_first_stage ( )
final

Returns true if this is the settings stage.

Return values
bool

Reimplemented from base_ui_stage.

◆ is_independent()

restore_ui_stage::is_independent ( )
final

This is an independent stage.

Return values
int

◆ process()

base_ui_stage::process ( base_moodleform $form = null)
abstractinherited

Processes the stage.

This must be overridden by every stage as it will be different for every stage

@abstract

Parameters
base_moodleform$form

Reimplemented in backup_ui_stage_confirmation, backup_ui_stage_final, backup_ui_stage_initial, backup_ui_stage_schema, import_ui_stage_precheck, restore_ui_stage_process, restore_ui_stage_review, restore_ui_stage_schema, and restore_ui_stage_settings.


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