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

This is the destination stage. More...

Inheritance diagram for restore_ui_stage_destination:
restore_ui_independent_stage

Public Member Functions

 __construct ($contextid)
 Constructs the destination stage.
 
 destroy ()
 Handles the destruction of this object.
 
 display (core_backup_renderer $renderer)
 Renders the destination stage screen.
 
 get_course_id ()
 Returns the course id.
 
 get_filepath ()
 Returns the backup file path.
 
 get_progress_bar ()
 Gets an array of progress bar items that can be displayed through the restore renderer.
 
 get_progress_reporter ()
 Gets the progress reporter object in use for this restore UI stage.
 
 get_stage ()
 Returns the current restore stage.
 
 get_stage_name ()
 Returns the stage name.
 
 get_target ()
 Returns the target for this restore.
 
 is_independent ()
 Obviously true.
 
 process ()
 Processes the destination stage.
 
 set_progress_reporter (\core\progress\base $progressreporter)
 Sets the progress reporter that will be returned by get_progress_reporter.
 

Protected Attributes

null restore_category_search $categorysearch = null
 The category search component.
 
int $contextid
 The context ID.
 
null $courseid = null
 The course ID.
 
null restore_course_search $coursesearch = null
 The course search component.
 
mixed null $filepath = null
 The backup file path.
 
int $target = backup::TARGET_NEW_COURSE
 The restore target.
 

Detailed Description

This is the destination stage.

This stage is the second stage and is also independent

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

Constructor & Destructor Documentation

◆ __construct()

restore_ui_stage_destination::__construct ( $contextid)

Constructs the destination stage.

Parameters
int$contextid
Exceptions
coding_exception

Reimplemented from restore_ui_independent_stage.

Member Function Documentation

◆ display()

restore_ui_stage_destination::display ( core_backup_renderer $renderer)

Renders the destination stage screen.

Parameters
core_backup_renderer$rendererrenderer instance to use
Return values
stringHTML code

Reimplemented from restore_ui_independent_stage.

◆ get_course_id()

restore_ui_stage_destination::get_course_id ( )

Returns the course id.

Return values
null

◆ get_filepath()

restore_ui_stage_destination::get_filepath ( )

Returns the backup file path.

Return values
mixed|null

◆ get_progress_bar()

restore_ui_independent_stage::get_progress_bar ( )
inherited

Gets an array of progress bar items that can be displayed through the restore renderer.

Return values
arrayArray of items for the progress bar

◆ get_progress_reporter()

restore_ui_independent_stage::get_progress_reporter ( )
inherited

Gets the progress reporter object in use for this restore UI stage.

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. There is a similar function in restore_ui. but that class is not used on some stages.

Return values
core\progress\none

◆ get_stage()

restore_ui_stage_destination::get_stage ( )

Returns the current restore stage.

Return values
int

Reimplemented from restore_ui_independent_stage.

◆ get_stage_name()

restore_ui_stage_destination::get_stage_name ( )

Returns the stage name.

Return values
string
Exceptions
coding_exception

Reimplemented from restore_ui_independent_stage.

◆ get_target()

restore_ui_stage_destination::get_target ( )

Returns the target for this restore.

One of backup\TARGET_*

Return values
int

◆ is_independent()

restore_ui_independent_stage::is_independent ( )
finalinherited

Obviously true.

Return values
true

◆ process()

restore_ui_stage_destination::process ( )

Processes the destination stage.

Return values
bool
Exceptions
coding_exception
restore_ui_exception

Reimplemented from restore_ui_independent_stage.

◆ set_progress_reporter()

restore_ui_independent_stage::set_progress_reporter ( \core\progress\base $progressreporter)
inherited

Sets the progress reporter that will be returned by get_progress_reporter.

Parameters
core\progress\base$progressreporterProgress reporter

Member Data Documentation

◆ $target

int restore_ui_stage_destination::$target = backup::TARGET_NEW_COURSE
protected

The restore target.

One of backup\TARGET_NEW


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