Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
|
Advanced checkbox type form element. More...
Public Member Functions | |
__construct ($elementName=null, $elementLabel=null, $text=null, $attributes=null, $values=null) | |
constructor | |
export_for_template (renderer_base $output) | |
Function to export the renderer data in a format that is suitable for a mustache template. | |
getFrozenHtml () | |
Returns the disabled field. | |
getHelpButton () | |
get html for help button | |
MoodleQuickForm_advcheckbox ($elementName=null, $elementLabel=null, $text=null, $attributes=null, $values=null) | |
Old syntax of class constructor. | |
toHtml () | |
Returns HTML for advchecbox form element. | |
Advanced checkbox type form element.
Contains HTML class for an advcheckbox type form element
Overloaded HTML_QuickForm_advcheckbox with default behavior modified for Moodle. This will return '0' if not checked and '1' if checked.
MoodleQuickForm_advcheckbox::__construct | ( | $elementName = null, | |
$elementLabel = null, | |||
$text = null, | |||
$attributes = null, | |||
$values = null ) |
constructor
string | $elementName | (optional) name of the checkbox |
string | $elementLabel | (optional) checkbox label |
string | $text | (optional) Text to put after the checkbox |
mixed | $attributes | (optional) Either a typical HTML attribute string or an associative array |
mixed | $values | (optional) Values to pass if checked or not checked |
MoodleQuickForm_advcheckbox::export_for_template | ( | renderer_base | $output | ) |
Function to export the renderer data in a format that is suitable for a mustache template.
This means:
renderer_base | $output | Used to do a final render of any components that need to be rendered for export. |
stdClass|array |
Implements templatable.
MoodleQuickForm_advcheckbox::getFrozenHtml | ( | ) |
Returns the disabled field.
Accessibility: the return "[ ]" from parent class is not acceptable for screenreader users, and we DO want a label.
string |
MoodleQuickForm_advcheckbox::getHelpButton | ( | ) |
get html for help button
string | html for help button |
MoodleQuickForm_advcheckbox::MoodleQuickForm_advcheckbox | ( | $elementName = null, | |
$elementLabel = null, | |||
$text = null, | |||
$attributes = null, | |||
$values = null ) |
MoodleQuickForm_advcheckbox::toHtml | ( | ) |
Returns HTML for advchecbox form element.
string |