Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250530) (c39b7370636)
MoodleQuickForm_advcheckbox Class Reference

HTML class for an advcheckbox type element. More...

Inheritance diagram for MoodleQuickForm_advcheckbox:
tool_lp_course_competency_overridegrade_form_element

Public Member Functions

 __construct ($elementName=null, $elementLabel=null, $text=null, $attributes=null, $values=null)
 constructor
 
 export_for_template (renderer_base $output)
 
 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.
 

Public Attributes

string $_group
 Group to which this checkbox belongs (for select all/select none button)
 
string $_helpbutton =''
 html for help button, if empty then no help will icon will be dispalyed.
 

Detailed Description

HTML class for an advcheckbox type element.

Overloaded HTML_QuickForm_advcheckbox with default behavior modified for Moodle. This will return '0' if not checked and '1' if checked.

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

Constructor & Destructor Documentation

◆ __construct()

MoodleQuickForm_advcheckbox::__construct ( $elementName = null,
$elementLabel = null,
$text = null,
$attributes = null,
$values = null )

constructor

Parameters
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

Member Function Documentation

◆ getFrozenHtml()

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.

Return values
string

◆ getHelpButton()

MoodleQuickForm_advcheckbox::getHelpButton ( )

get html for help button

Return values
stringhtml for help button

◆ MoodleQuickForm_advcheckbox()

MoodleQuickForm_advcheckbox::MoodleQuickForm_advcheckbox ( $elementName = null,
$elementLabel = null,
$text = null,
$attributes = null,
$values = null )

Old syntax of class constructor.

Deprecated in PHP7.

Deprecated
since Moodle 3.1

◆ toHtml()

MoodleQuickForm_advcheckbox::toHtml ( )

Returns HTML for advchecbox form element.

Return values
string

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