[ Index ] |
PHP Cross Reference of Unnamed Project |
[Source view] [Print] [Project Stats]
Duration form element Contains class to create length of time for element.
Copyright: | 2009 Tim Hunt |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 263 lines (10 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
MoodleQuickForm_duration:: (9 methods):
__construct()
MoodleQuickForm_duration()
get_units()
seconds_to_unit()
_createElements()
onQuickFormEvent()
toHtml()
accept()
exportValue()
Class: MoodleQuickForm_duration - X-Ref
Duration element__construct($elementName = null, $elementLabel = null, $options = array() X-Ref |
constructor param: string $elementName Element's name param: mixed $elementLabel Label(s) for an element param: array $options Options to control the element's display. Recognised values are param: mixed $attributes Either a typical HTML attribute string or an associative array |
MoodleQuickForm_duration($elementName = null, $elementLabel = null, $options = array() X-Ref |
Old syntax of class constructor. Deprecated in PHP7. |
get_units() X-Ref |
Returns time associative array of unit length. return: array unit length in seconds => string unit name. |
seconds_to_unit($seconds) X-Ref |
Converts seconds to the best possible time unit. for example 1800 -> array(30, 60) = 30 minutes. param: int $seconds an amout of time in seconds. return: array associative array ($number => $unit) |
_createElements() X-Ref |
Override of standard quickforms method to create this element. |
onQuickFormEvent($event, $arg, &$caller) X-Ref |
Called by HTML_QuickForm whenever form event is made on this element param: string $event Name of event param: mixed $arg event arguments param: object $caller calling object return: bool |
toHtml() X-Ref |
Returns HTML for advchecbox form element. return: string |
accept(&$renderer, $required = false, $error = null) X-Ref |
Accepts a renderer param: HTML_QuickForm_Renderer $renderer An HTML_QuickForm_Renderer object param: bool $required Whether a group is required param: string $error An error message associated with a group |
exportValue(&$submitValues, $notused = false) X-Ref |
Output a timestamp. Give it the name of the group. Override of standard quickforms method. param: array $submitValues param: bool $notused Not used. return: array field name => value. The value is the time interval in seconds. |
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |