Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

Differences Between: [Versions 401 and 402]

(no description)

File Size: 206 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_info_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_info_tags(string $templatename)   X-Ref
Return the field information 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