Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 311] [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403] [Versions 39 and 310]

(no description)

Copyright: 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 310 lines (15 kb)
Included or required:0 times
Referenced: 1 time
Includes or requires: 0 files

Defines 1 class


Class: restore_controller_dbops  - X-Ref

Non instantiable helper class providing DB support to the @restore_controller

This class contains various static methods available for all the DB operations
performed by the restore_controller class

TODO: Finish phpdocs
save_controller($controller, $checksum, $includeobj = true, $cleanobj = false)   X-Ref
Send one restore controller to DB

param: restore_controller $controller controller to send to DB
param: string $checksum hash of the controller to be checked
param: bool $includeobj to decide if the object itself must be updated (true) or no (false)
param: bool $cleanobj to decide if the object itself must be cleaned (true) or no (false)
return: int id of the controller record in the DB

load_controller($restoreid)   X-Ref
No description

create_restore_temp_tables($restoreid)   X-Ref
No description

drop_restore_temp_tables($backupid)   X-Ref
No description

apply_config_defaults(restore_controller $controller)   X-Ref
Sets the default values for the settings in a restore operation

param: restore_controller $controller

get_setting_default($config, $setting)   X-Ref
Returns the default value to be used for a setting from the admin restore config

param: string $config
param: backup_setting $setting
return: mixed

force_enable_settings(restore_controller $controller, array $settings)   X-Ref
Turn these settings on. No defaults from admin settings.

param: restore_controller $controller
param: array $settings a map from admin config names to setting names (Config name => Setting name)

apply_admin_config_defaults(restore_controller $controller, array $settings, $uselocks)   X-Ref
Sets the controller settings default values from the admin config.

param: restore_controller $controller
param: array $settings a map from admin config names to setting names (Config name => Setting name)
param: boolean $uselocks whether "locked" admin settings should be honoured