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.

Defines backup_plugin class

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: 115 lines (4 kb)
Included or required:0 times
Referenced: 1 time
Includes or requires: 0 files

Defines 1 class

backup_plugin:: (5 methods):
  __construct()
  define_plugin_structure()
  get_setting_value()
  get_plugin_element()
  get_recommended_name()


Class: backup_plugin  - X-Ref

Class implementing the plugins support for moodle2 backups

TODO: Finish phpdocs
__construct($plugintype, $pluginname, $optigroup, $step)   X-Ref
backup_plugin constructor.

param: string $plugintype
param: string $pluginname
param: backup_optigroup_element $optigroup
param: backup_structure_step $step

define_plugin_structure($connectionpoint)   X-Ref
No description

get_setting_value($name)   X-Ref
Returns the value of one (task/plan) setting


get_plugin_element($final_elements = null, $conditionparam = null, $conditionvalue = null)   X-Ref
Factory method that will return one backup_plugin_element (backup_optigroup_element)
with its name automatically calculated, based one the plugin being handled (type, name)


get_recommended_name()   X-Ref
Simple helper function that suggests one name for the main nested element in plugins
It's not mandatory to use it but recommended ;-)