mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-22146 backup & restore - extending the restore plugins API
This commit is contained in:
parent
4fda584f28
commit
1e37c39180
@ -202,6 +202,18 @@ abstract class restore_plugin {
|
||||
return $this->step->apply_date_offset($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value of one (task/plan) setting
|
||||
*/
|
||||
protected function get_setting_value($name) {
|
||||
if (is_null($this->task)) {
|
||||
throw new restore_step_exception('not_specified_restore_task');
|
||||
}
|
||||
return $this->task->get_setting_value($name);
|
||||
}
|
||||
|
||||
// end of restore_step/structure_step/task wrappers
|
||||
|
||||
/**
|
||||
* Simple helper function that returns the name for the restore_path_element
|
||||
* It's not mandatory to use it but recommended ;-)
|
||||
|
@ -151,6 +151,18 @@ abstract class restore_subplugin {
|
||||
return $this->step->apply_date_offset($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value of one (task/plan) setting
|
||||
*/
|
||||
protected function get_setting_value($name) {
|
||||
if (is_null($this->task)) {
|
||||
throw new restore_step_exception('not_specified_restore_task');
|
||||
}
|
||||
return $this->task->get_setting_value($name);
|
||||
}
|
||||
|
||||
// end of restore_step/structure_step/task wrappers
|
||||
|
||||
/**
|
||||
* Simple helper function that returns the name for the restore_path_element
|
||||
* It's not mandatory to use it but recommended ;-)
|
||||
|
Loading…
x
Reference in New Issue
Block a user