Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
restore_ui_stage_process Class Reference

Final stage of backup. More...

Inheritance diagram for restore_ui_stage_process:
restore_ui_stage base_ui_stage restore_ui_stage_complete

Public Member Functions

 __construct (base_ui $ui, array $params=null)
 Constructs the final stage. More...
 
 display (core_backup_renderer $renderer)
 Renders the process stage screen. 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_restoreid ()
 The restore id from the restore controller. 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...
 
 has_sub_stages ()
 Returns true if this stage can have sub-stages. More...
 
 is_first_stage ()
 Returns true if this is the settings stage. More...
 
 is_independent ()
 This is an independent stage. More...
 
 process (base_moodleform $form=null)
 Processes the final stage. More...
 

Public Attributes

const SUBSTAGE_NONE = 0
 There is no substage required.
 
const SUBSTAGE_PRECHECKS = 2
 The prechecks substage is required/the current substage.
 

Protected Member Functions

 initialise_stage_form ()
 should NEVER be called... 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.
 
int $substage = 0
 The current substage.
 
base_ui $ui
 The backuck UI object.
 

Detailed Description

Final stage of backup.

This stage is special in that it is does not make use of a form. The reason for this is the order of procession of backup at this stage. The processesion is:

  1. The final stage will be intialise.
  2. The confirmation stage will be processed.
  3. The backup will be executed
  4. The complete stage will be loaded by execution
  5. The complete stage will be displayed

This highlights that we neither need a form nor a display method for this stage we simply need to process.

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

Constructor & Destructor Documentation

◆ __construct()

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

Constructs the final stage.

Parameters
base_ui$ui
array$params

Reimplemented from base_ui_stage.

Member Function Documentation

◆ display()

restore_ui_stage_process::display ( core_backup_renderer  $renderer)

Renders the process stage screen.

Exceptions
restore_ui_exception
Parameters
core_backup_renderer$rendererrenderer instance to use
Return values
stringHTML code

Reimplemented from base_ui_stage.

Reimplemented in restore_ui_stage_complete.

◆ get_name()

restore_ui_stage::get_name ( )
finalinherited

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.

◆ 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 ( )
finalinherited

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_process::has_sub_stages ( )

Returns true if this stage can have sub-stages.

Return values
bool|false

Reimplemented from restore_ui_stage.

◆ initialise_stage_form()

restore_ui_stage_process::initialise_stage_form ( )
protected

should NEVER be called...

throws an exception

Reimplemented from base_ui_stage.

◆ is_first_stage()

restore_ui_stage::is_first_stage ( )
finalinherited

Returns true if this is the settings stage.

Return values
bool

Reimplemented from base_ui_stage.

◆ is_independent()

restore_ui_stage::is_independent ( )
finalinherited

This is an independent stage.

Return values
int

◆ process()

restore_ui_stage_process::process ( base_moodleform  $form = null)

Processes the final stage.

In this case it checks to see if there is a sub stage that we need to display before execution, if there is we gear up to display the subpage, otherwise we return true which will lead to execution of the restore and the loading of the completed stage.

Parameters
base_moodleform$form

Reimplemented from base_ui_stage.


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