Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Public Member Functions | Public Attributes | List of all members
MoodleQuickForm_static Class Reference
Inheritance diagram for MoodleQuickForm_static:
templatable

Public Member Functions

 __construct ($elementName=null, $elementLabel=null, $text=null)
 constructor More...
 
 export_for_template (renderer_base $output)
 Function to export the renderer data in a format that is suitable for a mustache template. More...
 
 getElementTemplateType ()
 Gets the type of form element. More...
 
 getHelpButton ()
 get html for help button More...
 
 MoodleQuickForm_static ($elementName=null, $elementLabel=null, $text=null)
 Old syntax of class constructor. More...
 

Public Attributes

string $_elementTemplateType ='static'
 Form element type.
 
string $_helpbutton =''
 html for help button, if empty then no help
 

Constructor & Destructor Documentation

◆ __construct()

MoodleQuickForm_static::__construct (   $elementName = null,
  $elementLabel = null,
  $text = null 
)

constructor

Parameters
string$elementName(optional) name of the text field
string$elementLabel(optional) text field label
string$text(optional) Text to put in text field

Member Function Documentation

◆ export_for_template()

MoodleQuickForm_static::export_for_template ( renderer_base  $output)

Function to export the renderer data in a format that is suitable for a mustache template.

This means:

  1. No complex types - only stdClass, array, int, string, float, bool
  2. Any additional info that is required for the template is pre-calculated (e.g. capability checks).
Parameters
renderer_base$outputUsed to do a final render of any components that need to be rendered for export.
Return values
stdClass|array

Implements templatable.

◆ getElementTemplateType()

MoodleQuickForm_static::getElementTemplateType ( )

Gets the type of form element.

Return values
string

◆ getHelpButton()

MoodleQuickForm_static::getHelpButton ( )

get html for help button

Return values
stringhtml for help button

◆ MoodleQuickForm_static()

MoodleQuickForm_static::MoodleQuickForm_static (   $elementName = null,
  $elementLabel = null,
  $text = null 
)

Old syntax of class constructor.

Deprecated in PHP7.

Deprecated:
since Moodle 3.1

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