Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
tool_templatelibrary\api Class Reference

API exposed by tool_templatelibrary. More...

Static Public Member Functions

static list_templates ($component='', $search='', $themename='')
 Return a list of details about installed templates.
 
static load_canonical_template ($component, $template)
 Return a mustache template.
 

Detailed Description

API exposed by tool_templatelibrary.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ list_templates()

static tool_templatelibrary\api::list_templates ( $component = '',
$search = '',
$themename = '' )
static

Return a list of details about installed templates.

Parameters
string$componentFilter the list to a single component.
string$searchSearch string to optionally filter the list of templates.
string$themenameThe name of the current theme.
Return values
array[string]Where each template is in the form "component/templatename".

◆ load_canonical_template()

static tool_templatelibrary\api::load_canonical_template ( $component,
$template )
static

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.

Parameters
string$componentThe component that holds the template.
string$templateThe name of the template.
Return values
stringthe template or false if template doesn't exist.

The documentation for this class was generated from the following file: