Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Static Public Member Functions | List of all members
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. More...
 
static load_canonical_template ($component, $template)
 Return a mustache template. More...
 

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: