|
Moodle
2.2.1
http://www.collinsharper.com
|


Public Member Functions | |
| HTML_QuickForm_checkbox ($elementName=null, $elementLabel=null, $text='', $attributes=null) | |
| setChecked ($checked) | |
| getChecked () | |
| toHtml () | |
| getFrozenHtml () | |
| setText ($text) | |
| getText () | |
| setValue ($value) | |
| getValue () | |
| onQuickFormEvent ($event, $arg, &$caller) | |
| exportValue (&$submitValues, $assoc=false) | |
Data Fields | |
| $_text = '' | |
HTML class for a checkbox type field
Definition at line 33 of file checkbox.php.
| exportValue | ( | &$ | submitValues, |
| $ | assoc = false |
||
| ) |
Return true if the checkbox is checked, null if it is not checked (getValue() returns false)
Reimplemented from HTML_QuickForm_input.
Reimplemented in HTML_QuickForm_advcheckbox.
Definition at line 257 of file checkbox.php.

| getChecked | ( | ) |
Returns whether a checkbox is checked
Definition at line 99 of file checkbox.php.


| getFrozenHtml | ( | ) |
Returns the value of field without HTML tags
Reimplemented from HTML_QuickForm_element.
Reimplemented in HTML_QuickForm_advcheckbox, MoodleQuickForm_advcheckbox, and MoodleQuickForm_checkbox.
Definition at line 137 of file checkbox.php.

| getText | ( | ) |
Returns the checkbox text
Definition at line 173 of file checkbox.php.
| getValue | ( | ) |
Returns the value of the form element
Reimplemented from HTML_QuickForm_input.
Reimplemented in HTML_QuickForm_advcheckbox.
Definition at line 204 of file checkbox.php.

| HTML_QuickForm_checkbox | ( | $ | elementName = null, |
| $ | elementLabel = null, |
||
| $ | text = '', |
||
| $ | attributes = null |
||
| ) |
Class constructor
| string | $elementName | (optional)Input field name attribute |
| string | $elementLabel | (optional)Input field value |
| string | $text | (optional)Checkbox display text |
| mixed | $attributes | (optional)Either a typical HTML attribute string or an associative array |
Definition at line 60 of file checkbox.php.


| onQuickFormEvent | ( | $ | event, |
| $ | arg, | ||
| &$ | caller | ||
| ) |
Called by HTML_QuickForm whenever form event is made on this element
| string | $event | Name of event |
| mixed | $arg | event arguments |
| object | $caller | calling object |
Reimplemented from HTML_QuickForm_input.
Reimplemented in HTML_QuickForm_advcheckbox, and MoodleQuickForm_checkbox.
Definition at line 222 of file checkbox.php.

| setChecked | ( | $ | checked | ) |
Sets whether a checkbox is checked
| bool | $checked | Whether the field is checked or not |
Definition at line 80 of file checkbox.php.


| setText | ( | $ | text | ) |
Sets the checkbox text
| string | $text |
Definition at line 158 of file checkbox.php.
| setValue | ( | $ | value | ) |
Sets the value of the form element
| string | $value | Default value of the form element |
Reimplemented from HTML_QuickForm_input.
Reimplemented in HTML_QuickForm_advcheckbox.
Definition at line 189 of file checkbox.php.

| toHtml | ( | ) |
Returns the checkbox element in HTML
Reimplemented from HTML_QuickForm_input.
Reimplemented in HTML_QuickForm_advcheckbox, MoodleQuickForm_advcheckbox, and MoodleQuickForm_checkbox.
Definition at line 114 of file checkbox.php.

| $_text = '' |
Definition at line 43 of file checkbox.php.