Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

This file contains the backup user interface class

Copyright: 2010 Sam Hemelryk
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 225 lines (8 kb)
Included or required:0 times
Referenced: 1 time
Includes or requires: 0 files

Defines 2 classes

backup_ui:: (9 methods):
  initialise_stage()
  get_uniqueid()
  get_backupid()
  execute()
  load_controller()
  get_progress_bar()
  get_name()
  get_first_stage_id()
  skip_current_stage()

backup_ui_exception:: (0 methods):


Class: backup_ui  - X-Ref

This is the backup user interface class

The backup user interface class manages the user interface and backup for Moodle.

initialise_stage($stage = null, array $params = null)   X-Ref
Intialises what ever stage is requested. If none are requested we check
params for 'stage' and default to initial

param: int $stage The desired stage to intialise or null for the default
param: array $params
return: backup_ui_stage_initial|backup_ui_stage_schema|backup_ui_stage_confirmation|backup_ui_stage_final

get_uniqueid()   X-Ref
Returns the backup id

return: string

get_backupid()   X-Ref
Gets the backup id from the controller

return: string

execute()   X-Ref
Executes the backup plan

return: bool

load_controller($backupid = false)   X-Ref
Loads the backup controller if we are tracking one

param: string $backupid
return: backup_controller|false

get_progress_bar()   X-Ref
Gets an array of progress bar items that can be displayed through the backup renderer.

return: array Array of items for the progress bar

get_name()   X-Ref
Gets the name related to the operation of this UI

return: string

get_first_stage_id()   X-Ref
Gets the id of the first stage this UI is reponsible for

return: int

skip_current_stage($setting = true)   X-Ref
If called with default arg the current stage gets skipped.

param: bool $setting Set to true (default) if you want to skip this stage, false otherwise.

Class: backup_ui_exception  - X-Ref

Backup user interface exception. Modelled off the backup_exception class