Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
help_icon Class Reference

Data structure representing a help icon. More...

Inheritance diagram for help_icon:
renderable templatable

Public Member Functions

 __construct ($identifier, $component)
 Constructor.
 
 diag_strings ()
 Verifies that both help strings exists, shows debug warnings if not.
 
 export_for_template (renderer_base $output)
 Export this data so it can be used as the context for a mustache template.
 

Public Attributes

string $component
 Component name, the same as in get_string()
 
string $identifier
 lang pack identifier (without the "_help" suffix), both get_string($identifier, $component) and get_string($identifier.
 
string $linktext = null
 Extra descriptive text next to the icon.
 

Detailed Description

Data structure representing a help icon.

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

Constructor & Destructor Documentation

◆ __construct()

help_icon::__construct ( $identifier,
$component )

Constructor.

Parameters
string$identifierstring for help page title, string with _help suffix is used for the actual help text. string with _link suffix is used to create a link to further info (if it exists)
string$component

Member Function Documentation

◆ export_for_template()

help_icon::export_for_template ( renderer_base $output)

Export this data so it can be used as the context for a mustache template.

Parameters
renderer_base$outputUsed to do a final render of any components that need to be rendered for export.
Return values
array

Implements templatable.

Member Data Documentation

◆ $identifier

string help_icon::$identifier

lang pack identifier (without the "_help" suffix), both get_string($identifier, $component) and get_string($identifier.

'_help', $component) must exist.


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