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]

(no description)

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

Defines 1 class

template_editor_tools:: (7 methods):
  __construct()
  export_for_template()
  get_field_tags()
  get_field_id_tags()
  get_action_tags()
  get_other_tags()
  get_optgroup_data()


Class: template_editor_tools  - X-Ref

Renderable class for template editor tools.

__construct(manager $manager, string $templatename)   X-Ref
The class constructor.

param: manager $manager the activity instance manager
param: string $templatename the template to edit

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

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

get_field_tags(string $templatename)   X-Ref
Return the field template tags.

param: string $templatename the template name
return: array|null array of tags.

get_field_id_tags(string $templatename)   X-Ref
Return the field IDs template tags.

param: string $templatename the template name
return: array|null array of tags.

get_action_tags(string $templatename)   X-Ref
Return the field action tags.

param: string $templatename the template name
return: array|null array of tags.

get_other_tags(string $templatename)   X-Ref
Return the available other tags

param: string $templatename the template name
return: array associative array of tags => tag name

get_optgroup_data(string $name, array $taglist)   X-Ref
Generate a valid optgroup data.

param: string $name the optgroup name
param: array $taglist the indexed array of taglists ($tag => $tagname)
return: array of optgroup data