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


Public Member Functions | |
| HTML_QuickForm_group ($elementName=null, $elementLabel=null, $elements=null, $separator=null, $appendName=true) | |
| setName ($name) | |
| getName () | |
| setValue ($value) | |
| getValue () | |
| setElements ($elements) | |
| & | getElements () |
| getGroupType () | |
| toHtml () | |
| getElementName ($index) | |
| getFrozenHtml () | |
| onQuickFormEvent ($event, $arg, &$caller) | |
| accept (&$renderer, $required=false, $error=null) | |
| exportValue (&$submitValues, $assoc=false) | |
| _createElements () | |
| _createElementsIfNotExist () | |
| freeze () | |
| unfreeze () | |
| setPersistantFreeze ($persistant=false) | |
Data Fields | |
| $_name = '' | |
| $_elements = array() | |
| $_separator = null | |
| $_required = array() | |
| $_appendName = true | |
HTML class for a form element group
| _createElements | ( | ) |
Creates the group's elements.
This should be overriden by child classes that need to create their elements. The method will be called automatically when needed, calling it from the constructor is discouraged as the constructor is usually called _twice_ on element creation, first time with _no_ parameters.
private
Reimplemented in HTML_QuickForm_date, HTML_QuickForm_hierselect, MoodleQuickForm_duration, MoodleQuickForm_tags, MoodleQuickForm_date_time_selector, and MoodleQuickForm_date_selector.
Definition at line 517 of file group.php.

A wrapper around _createElements()
This method calls _createElements() if the group's _elements array is empty. It also performs some updates, e.g. freezes the created elements if the group is already frozen.
private
Definition at line 534 of file group.php.


| accept | ( | &$ | renderer, |
| $ | required = false, |
||
| $ | error = null |
||
| ) |
Accepts a renderer
| object | An HTML_QuickForm_Renderer object |
| bool | Whether a group is required |
| string | An error message associated with a group public |
Reimplemented from HTML_QuickForm_element.
Reimplemented in HTML_QuickForm_date, HTML_QuickForm_hierselect, MoodleQuickForm_tags, MoodleQuickForm_date_time_selector, and MoodleQuickForm_date_selector.
Definition at line 425 of file group.php.


| exportValue | ( | &$ | submitValues, |
| $ | assoc = false |
||
| ) |
As usual, to get the group's value we access its elements and call their exportValue() methods
Reimplemented from HTML_QuickForm_element.
Reimplemented in MoodleQuickForm_date_time_selector, MoodleQuickForm_tags, and MoodleQuickForm_date_selector.
Definition at line 461 of file group.php.

| freeze | ( | ) |
Freeze the element so that only its value is returned
public
Reimplemented from HTML_QuickForm_element.
Definition at line 547 of file group.php.

| getElementName | ( | $ | index | ) |
| & getElements | ( | ) |
| getFrozenHtml | ( | ) |
Returns the value of field without HTML tags
Reimplemented from HTML_QuickForm_element.
Definition at line 353 of file group.php.

| getGroupType | ( | ) |
| getName | ( | ) |
Returns the group name
Reimplemented from HTML_QuickForm_element.
Definition at line 136 of file group.php.

| getValue | ( | ) |
Returns the value of the group
Reimplemented from HTML_QuickForm_element.
Definition at line 186 of file group.php.

| HTML_QuickForm_group | ( | $ | elementName = null, |
| $ | elementLabel = null, |
||
| $ | elements = null, |
||
| $ | separator = null, |
||
| $ | appendName = true |
||
| ) |
Class constructor
| string | $elementName | (optional)Group name |
| array | $elementLabel | (optional)Group label |
| array | $elements | (optional)Group elements |
| mixed | $separator | (optional)Use a string for one separator, use an array to alternate the separators. |
| bool | $appendName | (optional)whether to change elements' names to the form $groupName[$elementName] or leave them as is. |
Definition at line 95 of file group.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_element.
Reimplemented in HTML_QuickForm_date, HTML_QuickForm_hierselect, MoodleQuickForm_tags, MoodleQuickForm_date_time_selector, and MoodleQuickForm_date_selector.
Definition at line 384 of file group.php.

| setElements | ( | $ | elements | ) |
Sets the grouped elements
| array | $elements | Array of elements |
Reimplemented in MoodleQuickForm_group.
Definition at line 231 of file group.php.


| setName | ( | $ | name | ) |
Sets the group name
| string | $name | Group name |
Reimplemented from HTML_QuickForm_element.
| 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 from HTML_QuickForm_element.
| setValue | ( | $ | value | ) |
Sets values for group's elements
| mixed | Values for group's elements |
Reimplemented from HTML_QuickForm_element.
Reimplemented in HTML_QuickForm_date, and HTML_QuickForm_hierselect.
Definition at line 152 of file group.php.


| toHtml | ( | ) |
Returns Html for the group
Reimplemented from HTML_Common.
Reimplemented in HTML_QuickForm_date, HTML_QuickForm_hierselect, MoodleQuickForm_tags, MoodleQuickForm_date_time_selector, MoodleQuickForm_date_selector, and MoodleQuickForm_duration.
Definition at line 290 of file group.php.


| unfreeze | ( | ) |
Unfreezes the element so that it becomes editable
public
Reimplemented from HTML_QuickForm_element.