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


Public Member Functions | |
| MoodleQuickForm_duration ($elementName=null, $elementLabel=null, $options=array(), $attributes=null) | |
| get_units () | |
| seconds_to_unit ($seconds) | |
| _createElements () | |
| onQuickFormEvent ($event, $arg, $caller) | |
| toHtml () | |
| accept ($renderer, $required=false, $error=null) | |
| exportValue ($submitValues, $notused=false) | |
Protected Attributes | |
| $_options = array('optional' => false, 'defaultunit' => 60) | |
Definition at line 37 of file duration.php.
| _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 from HTML_QuickForm_group.
Definition at line 110 of file duration.php.

| accept | ( | $ | renderer, |
| $ | required = false, |
||
| $ | error = null |
||
| ) |
| exportValue | ( | $ | submitValues, |
| $ | notused = false |
||
| ) |
Output a timestamp. Give it the name of the group. Override of standard quickforms method.
| array | $submitValues | |
| bool | $notused | Not used. |
Definition at line 199 of file duration.php.

| get_units | ( | ) |
Definition at line 80 of file duration.php.

| MoodleQuickForm_duration | ( | $ | elementName = null, |
| $ | elementLabel = null, |
||
| $ | options = array(), |
||
| $ | attributes = null |
||
| ) |
Class constructor
public
| string | $elementName | Element's name |
| mixed | $elementLabel | Label(s) for an element |
| array | $options | Options to control the element's display. Recognised values are 'optional' => true/false - whether to display an 'enabled' checkbox next to the element. 'defaultunit' => 1|60|3600|86400 - the default unit to display when the time is blank. If not specified, minutes is used. |
| mixed | $attributes | Either a typical HTML attribute string or an associative array |
Definition at line 57 of file duration.php.

| onQuickFormEvent | ( | $ | event, |
| $ | arg, | ||
| $ | caller | ||
| ) |
| seconds_to_unit | ( | $ | seconds | ) |
| $seconds | an amout of time in seconds. |
Definition at line 97 of file duration.php.


| toHtml | ( | ) |
Returns Html for the group
Reimplemented from HTML_QuickForm_group.
Definition at line 178 of file duration.php.

$_options = array('optional' => false, 'defaultunit' => 60) [protected] |
Control the fieldnames for form elements optional => if true, show a checkbox beside the element to turn it on (or off)
Definition at line 42 of file duration.php.