Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
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: