Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
core\output\mustache_javascript_helper Class Reference

Public Member Functions

 __construct ($page)
 Create new instance of mustache javascript helper.
 
 help ($text, Mustache_LambdaHelper $helper)
 Add the block of text to the page requires so it is appended in the footer.
 

Constructor & Destructor Documentation

◆ __construct()

core\output\mustache_javascript_helper::__construct ( $page)

Create new instance of mustache javascript helper.

Parameters
moodle_page$pagePage.

Member Function Documentation

◆ help()

core\output\mustache_javascript_helper::help ( $text,
Mustache_LambdaHelper $helper )

Add the block of text to the page requires so it is appended in the footer.

The content of the block can contain further mustache tags which will be resolved.

This function will always return an empty string because the JS is added to the page via the requirements manager.

Parameters
string$textThe script content of the section.
Mustache_LambdaHelper$helperUsed to render the content of this block.
Return values
stringThe text of the block

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