Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250605) (9223e346c3e)
core\output\mustache_pix_helper Class Reference

Public Member Functions

 __construct (renderer_base $renderer)
 Save a reference to the renderer.
 
 pix ($text, Mustache_LambdaHelper $helper)
 Read a pix icon name from a template and get it from pix_icon.
 

Constructor & Destructor Documentation

◆ __construct()

core\output\mustache_pix_helper::__construct ( renderer_base $renderer)

Save a reference to the renderer.

Parameters
renderer_base$renderer

Member Function Documentation

◆ pix()

core\output\mustache_pix_helper::pix ( $text,
Mustache_LambdaHelper $helper )

Read a pix icon name from a template and get it from pix_icon.

{{#pix}}t/edit,component,Anything else is alt text{{/pix}}

The args are comma separated and only the first is required.

Parameters
string$textThe text to parse for arguments.
Mustache_LambdaHelper$helperUsed to render nested mustache variables.
Return values
string

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