Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 400 and 401] [Versions 400 and 402] [Versions 400 and 403]

(no description)

File Size: 117 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

presets:: (3 methods):
  __construct()
  export_for_template()
  get_presets_table()


Class: presets  - X-Ref

Renderable class for the presets table in the database activity.

__construct(int $id, array $presets, moodle_url $formactionurl, bool $manage = false)   X-Ref
The class constructor.

param: int $id The database module id
param: array $presets The array containing the existing presets
param: moodle_url $formactionurl The the action url for the form
param: bool $manage Whether the manage preset options should be displayed

export_for_template(\renderer_base $output)   X-Ref
Export the data for the mustache template.

return: array
param: \renderer_base $output The renderer to be used to render the action bar elements.

get_presets_table()   X-Ref
Generates and returns the HTML for the presets table.

return: string