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 402] [Versions 310 and 403]

Defines the base class form used by blocks/edit.php to edit block instance configuration. It works with the {@link block_edit_form} class, or rather the particular subclass defined by this block, to do the editing.

Copyright: 2009 Tim Hunt
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 313 lines (15 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

block_edit_form:: (6 methods):
  __construct()
  definition()
  is_editing_the_frontpage()
  set_data()
  specific_definition()
  get_data()


Class: block_edit_form  - X-Ref

The base class form used by blocks/edit.php to edit block instance configuration.

__construct($actionurl, $block, $page)   X-Ref
Defaults set in set_data() that need to be returned in get_data() if form elements were not created


definition()   X-Ref
No description

is_editing_the_frontpage()   X-Ref
Returns true if the user is editing a frontpage.

return: bool

set_data($defaults)   X-Ref
No description

specific_definition($mform)   X-Ref
Override this to create any form fields specific to this type of block.

param: object $mform the form being built.

get_data()   X-Ref
Return submitted data if properly submitted or returns NULL if validation fails or
if there is no submitted data.

return: object submitted data; NULL if not valid or not submitted or cancelled