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