Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
base_ui_stage Class Reference

Abstract stage class. More...

Inheritance diagram for base_ui_stage:
backup_ui_stage restore_ui_stage 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 restore_ui_stage_settings

Public Member Functions

 __construct (base_ui $ui, array $params=null)
 Constructor. More...
 
 display (core_backup_renderer $renderer)
 Displays the stage. More...
 
 get_name ()
 The name of this stage. More...
 
 get_next_stage ()
 The next stage. More...
 
 get_params ()
 Returns the custom params for this stage. More...
 
 get_prev_stage ()
 The previous stage. More...
 
 get_stage ()
 The current stage. More...
 
 get_ui ()
 Returns the base UI class. More...
 
 get_uniqueid ()
 The backup id from the backup controller. More...
 
 is_first_stage ()
 Returns true if this stage is the first stage. More...
 
 process (base_moodleform $form=null)
 Processes the stage. More...
 

Protected Member Functions

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

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 backup stages (a requirement of many backup ui functions). Each stage must then define two abstract methods

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

Constructor & Destructor Documentation

◆ __construct()

base_ui_stage::__construct ( base_ui  $ui,
array  $params = null 
)

Constructor.

Parameters
base_ui$ui
array$params

Reimplemented in restore_ui_stage_process.

Member Function Documentation

◆ display()

base_ui_stage::display ( core_backup_renderer  $renderer)

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_final, backup_ui_stage_complete, import_ui_stage_confirmation, restore_ui_stage_process, and restore_ui_stage_complete.

◆ get_name()

base_ui_stage::get_name ( )

The name of this stage.

Return values
string

Reimplemented in restore_ui_stage.

◆ get_next_stage()

base_ui_stage::get_next_stage ( )

The next stage.

Return values
int

Reimplemented in backup_ui_stage_initial, and import_ui_stage_precheck.

◆ get_params()

base_ui_stage::get_params ( )
final

Returns the custom params for this stage.

Return values
array|null

◆ get_prev_stage()

base_ui_stage::get_prev_stage ( )
final

The previous stage.

Return values
int

◆ get_stage()

base_ui_stage::get_stage ( )
final

The current stage.

Return values
int

◆ get_ui()

base_ui_stage::get_ui ( )
final

Returns the base UI class.

Return values
base_ui

◆ get_uniqueid()

base_ui_stage::get_uniqueid ( )
final

The backup id from the backup controller.

Return values
string

◆ initialise_stage_form()

base_ui_stage::initialise_stage_form ( )
abstractprotected

◆ is_first_stage()

base_ui_stage::is_first_stage ( )

Returns true if this stage is the first stage.

Return values
bool

Reimplemented in restore_ui_stage.

◆ process()

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

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_schema, backup_ui_stage_confirmation, backup_ui_stage_final, import_ui_stage_precheck, restore_ui_stage_settings, restore_ui_stage_schema, restore_ui_stage_review, restore_ui_stage_process, and backup_ui_stage_initial.


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