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


Public Member Functions | |
| HTML_QuickForm_element ($elementName=null, $elementLabel=null, $attributes=null) | |
| apiVersion () | |
| getType () | |
| setName ($name) | |
| getName () | |
| setValue ($value) | |
| getValue () | |
| freeze () | |
| unfreeze () | |
| getFrozenHtml () | |
| _getPersistantData () | |
| isFrozen () | |
| setPersistantFreeze ($persistant=false) | |
| setLabel ($label) | |
| getLabel () | |
| _findValue (&$values) | |
| onQuickFormEvent ($event, $arg, &$caller) | |
| accept (&$renderer, $required=false, $error=null) | |
| _generateId () | |
| exportValue (&$submitValues, $assoc=false) | |
| _prepareValue ($value, $assoc) | |
Data Fields | |
| $_label = '' | |
| $_type = '' | |
| $_flagFrozen = false | |
| $_persistantFreeze = false | |
Base class for form elements
Definition at line 34 of file element.php.
| _findValue | ( | &$ | values | ) |
Tries to find the element value from the values array
Definition at line 329 of file element.php.


| _generateId | ( | ) |
Automatically generates and assigns an 'id' attribute for the element.
Currently used to ensure that labels work on radio buttons and checkboxes. Per idea of Alexander Radivanovich.
private
Reimplemented in HTML_QuickForm_radio.
Definition at line 418 of file element.php.


Used by getFrozenHtml() to pass the element's value if _persistantFreeze is on
private
Definition at line 242 of file element.php.


| _prepareValue | ( | $ | value, |
| $ | assoc | ||
| ) |
Used by exportValue() to prepare the value for returning
| mixed | the value found in exportValue() |
| bool | whether to return the value as associative array private |
Definition at line 460 of file element.php.


| accept | ( | &$ | renderer, |
| $ | required = false, |
||
| $ | error = null |
||
| ) |
Accepts a renderer
| object | An HTML_QuickForm_Renderer object |
| bool | Whether an element is required |
| string | An error message associated with an element public |
Reimplemented in HTML_QuickForm_date, HTML_QuickForm_hierselect, HTML_QuickForm_group, MoodleQuickForm_tags, MoodleQuickForm_date_time_selector, and MoodleQuickForm_date_selector.
Definition at line 401 of file element.php.
| apiVersion | ( | ) |
Returns the current API version
Reimplemented from HTML_Common.
Reimplemented in HTML_QuickForm_select.
Definition at line 104 of file element.php.
| exportValue | ( | &$ | submitValues, |
| $ | assoc = false |
||
| ) |
Returns a 'safe' element's value
| array | array of submitted values to search |
| bool | whether to return the value as associative array public |
Reimplemented in HTML_QuickForm_select, MoodleQuickForm_selectgroups, HTML_QuickForm_group, MoodleQuickForm_rubriceditor, HTML_QuickForm_advcheckbox, HTML_QuickForm_checkbox, HTML_QuickForm_radio, MoodleQuickForm_date_time_selector, MoodleQuickForm_tags, MoodleQuickForm_date_selector, HTML_QuickForm_input, HTML_QuickForm_static, MoodleQuickForm_selectwithlink, HTML_QuickForm_xbutton, MoodleQuickForm_filepicker, MoodleQuickForm_select, and HTML_QuickForm_submit.
Definition at line 440 of file element.php.

| freeze | ( | ) |
Freeze the element so that only its value is returned
public
Reimplemented in HTML_QuickForm_group, HTML_QuickForm_image, HTML_QuickForm_file, HTML_QuickForm_xbutton, HTML_QuickForm_button, HTML_QuickForm_hidden, HTML_QuickForm_reset, HTML_QuickForm_submit, MoodleQuickForm_submit, and MoodleQuickForm_cancel.
Definition at line 196 of file element.php.
| getFrozenHtml | ( | ) |
Returns the value of field without HTML tags
Reimplemented in HTML_QuickForm_select, MoodleQuickForm_selectgroups, HTML_QuickForm_group, MoodleQuickForm_editor, HTML_QuickForm_advcheckbox, HTML_QuickForm_textarea, HTML_QuickForm_link, HTML_QuickForm_radio, HTML_QuickForm_static, HTML_QuickForm_checkbox, MoodleQuickForm_advcheckbox, HTML_QuickForm_password, MoodleQuickForm_checkbox, MoodleQuickForm_htmleditor, HTML_QuickForm_xbutton, MoodleQuickForm_radio, and MoodleQuickForm_cancel.
Definition at line 226 of file element.php.


| getLabel | ( | ) |
Returns display text for the element
Definition at line 314 of file element.php.

| getName | ( | ) |
Returns the element name
Reimplemented in HTML_QuickForm_select, MoodleQuickForm_selectgroups, HTML_QuickForm_group, HTML_QuickForm_link, HTML_QuickForm_input, HTML_QuickForm_textarea, HTML_QuickForm_static, HTML_QuickForm_xbutton, MoodleQuickForm_wikifiletable, MoodleQuickForm_filemanager, and MoodleQuickForm_editor.
Definition at line 150 of file element.php.

| getType | ( | ) |
Returns element type
Definition at line 119 of file element.php.

| getValue | ( | ) |
Returns the value of the form element
Reimplemented in HTML_QuickForm_select, MoodleQuickForm_selectgroups, HTML_QuickForm_checkbox, HTML_QuickForm_group, HTML_QuickForm_advcheckbox, HTML_QuickForm_file, HTML_QuickForm_link, HTML_QuickForm_input, HTML_QuickForm_textarea, HTML_QuickForm_xbutton, MoodleQuickForm_wikifiletable, MoodleQuickForm_filemanager, and MoodleQuickForm_editor.
Definition at line 181 of file element.php.

| HTML_QuickForm_element | ( | $ | elementName = null, |
| $ | elementLabel = null, |
||
| $ | attributes = null |
||
| ) |
Class constructor
| string | Name of the element |
| mixed | Label(s) for the element |
| mixed | Associative array of tag attributes or HTML attributes name="value" pairs |
Definition at line 83 of file element.php.


| isFrozen | ( | ) |
Returns whether or not the element is frozen
Definition at line 266 of file element.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 in HTML_QuickForm_select, MoodleQuickForm_selectgroups, HTML_QuickForm_date, HTML_QuickForm_hierselect, HTML_QuickForm_group, HTML_QuickForm_advcheckbox, HTML_QuickForm_checkbox, HTML_QuickForm_radio, HTML_QuickForm_input, HTML_QuickForm_file, MoodleQuickForm_tags, HTML_QuickForm_static, MoodleQuickForm_date_time_selector, MoodleQuickForm_grading, MoodleQuickForm_date_selector, HTML_QuickForm_xbutton, MoodleQuickForm_textarea, MoodleQuickForm_checkbox, MoodleQuickForm_wikifiletable, MoodleQuickForm_file, MoodleQuickForm_modgrade, MoodleQuickForm_selectyesno, MoodleQuickForm_modvisible, MoodleQuickForm_cancel, and MoodleQuickForm_submit.
Definition at line 358 of file element.php.

| setLabel | ( | $ | label | ) |
Sets display text for the element
| string | $label | Display text for the element |
Definition at line 299 of file element.php.

| setName | ( | $ | name | ) |
Sets the input field name
| string | $name | Input field name attribute |
Reimplemented in HTML_QuickForm_select, MoodleQuickForm_selectgroups, HTML_QuickForm_group, HTML_QuickForm_input, HTML_QuickForm_link, HTML_QuickForm_textarea, HTML_QuickForm_xbutton, HTML_QuickForm_static, MoodleQuickForm_wikifiletable, MoodleQuickForm_filemanager, and MoodleQuickForm_editor.
Definition at line 135 of file element.php.

| setPersistantFreeze | ( | $ | persistant = false | ) |
Sets wether an element value should be kept in an hidden field when the element is frozen or not
| bool | $persistant | True if persistant value |
Reimplemented in HTML_QuickForm_group.
Definition at line 283 of file element.php.

| setValue | ( | $ | value | ) |
Sets the value of the form element
| string | $value | Default value of the form element |
Reimplemented in HTML_QuickForm_date, HTML_QuickForm_hierselect, HTML_QuickForm_select, MoodleQuickForm_selectgroups, HTML_QuickForm_checkbox, HTML_QuickForm_advcheckbox, HTML_QuickForm_group, HTML_QuickForm_file, HTML_QuickForm_link, HTML_QuickForm_static, HTML_QuickForm_input, HTML_QuickForm_textarea, HTML_QuickForm_xbutton, MoodleQuickForm_wikifiletable, MoodleQuickForm_filemanager, and MoodleQuickForm_editor.
Definition at line 166 of file element.php.

| unfreeze | ( | ) |
Unfreezes the element so that it becomes editable
public
Reimplemented in HTML_QuickForm_group.
Definition at line 211 of file element.php.
| $_flagFrozen = false |
Definition at line 60 of file element.php.
| $_label = '' |
Definition at line 44 of file element.php.
| $_persistantFreeze = false |
Definition at line 68 of file element.php.
| $_type = '' |
Reimplemented in MoodleQuickForm_editor, and MoodleQuickForm_htmleditor.
Definition at line 52 of file element.php.