This is the restore user interface class.
More...
|
const | PROGRESS_EXECUTED = 3 |
| The progress of this instance of the backup ui class It has been executed.
|
|
const | PROGRESS_INTIAL = 0 |
| The progress of this instance of the backup ui class It is in the initial stage.
|
|
const | PROGRESS_PROCESSED = 1 |
| The progress of this instance of the backup ui class It is processed.
|
|
const | PROGRESS_SAVED = 2 |
| The progress of this instance of the backup ui class It is saved.
|
|
const | STAGE_COMPLETE = 64 |
| The stages of the restore user interface.
|
|
const | STAGE_CONFIRM = 1 |
| The stages of the restore user interface.
|
|
const | STAGE_DESTINATION = 2 |
| The stages of the restore user interface.
|
|
const | STAGE_PROCESS = 32 |
| The stages of the restore user interface.
|
|
const | STAGE_REVIEW = 16 |
| The stages of the restore user interface.
|
|
const | STAGE_SCHEMA = 8 |
| The stages of the restore user interface.
|
|
const | STAGE_SETTINGS = 4 |
| The stages of the restore user interface.
|
|
|
static array | $stages |
| String mappings to the above stages.
|
|
|
backup_controller restore_controller | $controller |
| The controller.
|
|
int | $dependencychanges = 0 |
| The number of changes made by dependency enforcement.
|
|
int | $progress |
| The current progress of the UI One of self\PROGRESS_*.
|
|
core progress base | $progressreporter = null |
| Progress indicator (where there is no controller)
|
|
restore_ui_stage | $stage = null |
| The current UI stage.
|
|
This is the restore user interface class.
The restore user interface class manages the user interface and restore for Moodle.
- Copyright
- 2010 Sam Hemelryk
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ cancel_process()
restore_ui::cancel_process |
( |
| ) |
|
Cancels the current restore and redirects the user back to the relevant place.
Reimplemented from base_ui.
◆ display()
Displays this stage.
- Exceptions
-
- Parameters
-
- Return values
-
Reimplemented from base_ui.
◆ enforce_changed_dependencies()
restore_ui::enforce_changed_dependencies |
( |
| ) |
|
Returns true if enforce_dependencies changed any settings.
- Return values
-
Reimplemented from base_ui.
◆ enforce_dependencies()
base_ui::enforce_dependencies |
( |
| ) |
|
|
protectedinherited |
Enforces dependencies on all settings.
Call before save
- Return values
-
bool | True if dependencies were enforced and changes were made |
◆ engage_independent_stage()
static restore_ui::engage_independent_stage |
( |
| $stage, |
|
|
| $contextid ) |
|
staticfinal |
Initialised the requested independent stage.
- Exceptions
-
- Parameters
-
int | $stage | One of self\STAGE_* |
int | $contextid | |
- Return values
-
restore_ui_stage_confirm|restore_ui_stage_destination | |
◆ execute()
Executes the restore plan.
- Exceptions
-
- Return values
-
Reimplemented from base_ui.
◆ get_controller()
base_ui::get_controller |
( |
| ) |
|
|
inherited |
Returns the controller object.
- Return values
-
backup_controller|restore_controller | |
◆ get_controller_id()
base_ui::get_controller_id |
( |
| ) |
|
|
inherited |
Gets the ID used in creating the controller.
Relates to course/section/cm
- Return values
-
◆ get_first_stage_id()
restore_ui::get_first_stage_id |
( |
| ) |
|
Gets the first stage for this UI.
- Return values
-
Reimplemented from base_ui.
◆ get_format()
Gets the format for the backup.
- Return values
-
◆ get_name()
Gets the name of this UI.
- Return values
-
Reimplemented from base_ui.
◆ get_progress_bar()
restore_ui::get_progress_bar |
( |
| ) |
|
Gets an array of progress bar items that can be displayed through the restore renderer.
- Return values
-
array | Array of items for the progress bar |
Reimplemented from base_ui.
◆ get_progress_reporter()
restore_ui::get_progress_reporter |
( |
| ) |
|
Gets the progress reporter object in use for this restore UI.
IMPORTANT: This progress reporter is used only for UI progress that is outside the restore controller. The restore controller has its own progress reporter which is used for progress during the main restore. Use the restore controller's progress reporter to report progress during a restore operation, not this one.
This extra reporter is necessary because on some restore UI screens, there are long-running tasks even though there is no restore controller in use.
- Return values
-
◆ get_restoreid()
restore_ui::get_restoreid |
( |
| ) |
|
Gets the restore id from the controller.
- Return values
-
◆ get_setting()
base_ui::get_setting |
( |
| $name, |
|
|
| $default = false ) |
|
inherited |
Gets the requested setting.
- Parameters
-
- Return values
-
◆ get_setting_value()
base_ui::get_setting_value |
( |
| $name, |
|
|
| $default = false ) |
|
inherited |
Gets the value for the requested setting.
- Parameters
-
- Return values
-
◆ get_stage()
Gets the stage we are on.
- Return values
-
◆ get_stage_name()
base_ui::get_stage_name |
( |
| ) |
|
|
inherited |
Gets the name of the stage we are on.
- Return values
-
◆ get_tasks()
Gets all backup tasks from the controller.
- Return values
-
◆ get_type()
Gets the type of the backup.
- Return values
-
◆ get_uniqueid()
restore_ui::get_uniqueid |
( |
| ) |
|
Gets the unique ID associated with this UI.
- Return values
-
Reimplemented from base_ui.
◆ initialise_stage()
restore_ui::initialise_stage |
( |
| $stage = null, |
|
|
array | $params = null ) |
|
protected |
Intialises what ever stage is requested.
If none are requested we check params for 'stage' and default to initial
- Exceptions
-
- Parameters
-
int | null | $stage | The desired stage to intialise or null for the default |
array | $params | |
- Return values
-
restore_ui_stage_initial|restore_ui_stage_schema|restore_ui_stage_confirmation|restore_ui_stage_final | |
Reimplemented from base_ui.
◆ is_independent()
restore_ui::is_independent |
( |
| ) |
|
Returns true if the stage is independent (not requiring a restore controller)
- Return values
-
◆ is_temporary_course_created()
restore_ui::is_temporary_course_created |
( |
| $courseid | ) |
|
|
protected |
Checks if the course is not restored fully and current controller has created it.
- Parameters
-
int | $courseid | id of the course which needs to be checked |
- Return values
-
◆ load_controller()
static restore_ui::load_controller |
( |
| $restoreid = false | ) |
|
|
staticfinal |
Loads the restore controller if we are tracking one.
- Parameters
-
- Return values
-
Reimplemented from base_ui.
◆ process()
This processes the current stage of the restore.
- Exceptions
-
- Return values
-
Reimplemented from base_ui.
◆ requires_substage()
restore_ui::requires_substage |
( |
| ) |
|
Returns true if this stage has substages of which at least one needs to be displayed.
- Return values
-
◆ save_controller()
base_ui::save_controller |
( |
| ) |
|
|
inherited |
Saves the backup controller.
Once this has been called nothing else can be changed in the controller.
- Exceptions
-
- Return values
-
◆ set_progress_reporter()
Sets the progress reporter that will be returned by get_progress_reporter.
- Parameters
-
◆ $stages
array restore_ui::$stages |
|
static |
Initial value:= array(
)
const STAGE_SETTINGS
The stages of the restore user interface.
Definition restore_ui.class.php:52
const STAGE_COMPLETE
The stages of the restore user interface.
Definition restore_ui.class.php:76
const STAGE_CONFIRM
The stages of the restore user interface.
Definition restore_ui.class.php:40
const STAGE_SCHEMA
The stages of the restore user interface.
Definition restore_ui.class.php:58
const STAGE_PROCESS
The stages of the restore user interface.
Definition restore_ui.class.php:70
const STAGE_REVIEW
The stages of the restore user interface.
Definition restore_ui.class.php:64
const STAGE_DESTINATION
The stages of the restore user interface.
Definition restore_ui.class.php:46
String mappings to the above stages.
◆ STAGE_COMPLETE
const restore_ui::STAGE_COMPLETE = 64 |
The stages of the restore user interface.
The process is complete.
◆ STAGE_CONFIRM
const restore_ui::STAGE_CONFIRM = 1 |
The stages of the restore user interface.
Confirm the backup you are going to restore.
◆ STAGE_DESTINATION
const restore_ui::STAGE_DESTINATION = 2 |
The stages of the restore user interface.
Select the destination for the restore.
◆ STAGE_PROCESS
const restore_ui::STAGE_PROCESS = 32 |
The stages of the restore user interface.
The restore is in process right now.
◆ STAGE_REVIEW
const restore_ui::STAGE_REVIEW = 16 |
The stages of the restore user interface.
The final review before the restore is run.
◆ STAGE_SCHEMA
const restore_ui::STAGE_SCHEMA = 8 |
The stages of the restore user interface.
Alter and review the schema that you are going to restore.
◆ STAGE_SETTINGS
const restore_ui::STAGE_SETTINGS = 4 |
The stages of the restore user interface.
Alter the setting for the restore.
The documentation for this class was generated from the following file:
- backup/util/ui/restore_ui.class.php