Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

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

(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: 311 lines (15 kb)
Included or required:0 times
Referenced: 0 times
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