Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

This file contains the generic moodleform bridge for the backup user interface as well as the individual forms that relate to the different stages the user interface can exist within.

Copyright: 2010 Sam Hemelryk
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 134 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 4 classes

backup_moodleform:: (1 method):
  __construct()

backup_initial_form:: (0 methods):

backup_schema_form:: (0 methods):

backup_confirmation_form:: (2 methods):
  definition_after_data()
  validation()


Class: backup_moodleform  - X-Ref

Backup moodleform bridge

Ahhh the mighty moodleform bridge! Strong enough to take the weight of 682 full
grown african swallows all of whom have been carring coconuts for several days.
EWWWWW!!!!!!!!!!!!!!!!!!!!!!!!

__construct(backup_ui_stage $uistage, $action = null, $customdata = null, $method = 'post',$target = '', $attributes = null, $editable = true)   X-Ref
Creates the form

Overridden for type hinting on the first arg.

param: backup_ui_stage $uistage
param: moodle_url|string $action
param: mixed $customdata
param: string $method get|post
param: string $target
param: array $attributes
param: bool $editable

Class: backup_initial_form  - X-Ref

Initial backup user interface stage moodleform.

Nothing to override we only need it defined so that moodleform doesn't get confused
between stages.

Class: backup_schema_form  - X-Ref

Schema backup user interface stage moodleform.

Nothing to override we only need it defined so that moodleform doesn't get confused
between stages.

Class: backup_confirmation_form  - X-Ref

Confirmation backup user interface stage moodleform.

Nothing to override we only need it defined so that moodleform doesn't get confused
between stages.

definition_after_data()   X-Ref
Adds the last elements, rules, settings etc to the form after data has been set.

We override this to add a rule and type to the filename setting.


validation($data, $files)   X-Ref
Validates the form.

Relies on the parent::validation for the bulk of the work.

param: array $data
param: array $files
return: array