Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Class for listing mustache templates.

Copyright: 2015 Damyon Wiese
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 176 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

api:: (2 methods):
  list_templates()
  load_canonical_template()


Class: api  - X-Ref

API exposed by tool_templatelibrary

list_templates($component = '', $search = '', $themename = '')   X-Ref
Return a list of details about installed templates.

param: string $component Filter the list to a single component.
param: string $search Search string to optionally filter the list of templates.
param: string $themename The name of the current theme.
return: array[string] Where each template is in the form "component/templatename".

load_canonical_template($component, $template)   X-Ref
Return a mustache template.
Note - this function differs from the function core_output_load_template
because it will never return a theme overridden version of a template.

param: string $component The component that holds the template.
param: string $template The name of the template.
return: string the template or false if template doesn't exist.