Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Public Attributes | List of all members
MoodleQuickForm_advcheckbox Class Reference
Inheritance diagram for MoodleQuickForm_advcheckbox:
templatable

Public Member Functions

 __construct ($elementName=null, $elementLabel=null, $text=null, $attributes=null, $values=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...
 
 getFrozenHtml ()
 Returns the disabled field. More...
 
 getHelpButton ()
 get html for help button More...
 
 MoodleQuickForm_advcheckbox ($elementName=null, $elementLabel=null, $text=null, $attributes=null, $values=null)
 Old syntax of class constructor. More...
 
 toHtml ()
 Returns HTML for advchecbox form element. More...
 

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.
 

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

◆ export_for_template()

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:

  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.

◆ 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: