|
Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
|
Public Member Functions | |
| __construct ($elementName=null, $elementLabel=null, $options=array(), $attributes=null) | |
| Class constructor. More... | |
| accept (&$renderer, $required=false, $error=null) | |
| Accepts a renderer. More... | |
| createFormElement () | |
| Creates an element to add to the group Expects the same arguments as MoodleQuickForm::createElement() | |
| export_for_template (renderer_base $output) | |
| Export for template. More... | |
| exportValue (&$submitValues, $assoc=false) | |
| Output a timestamp. More... | |
| getElementTemplateType () | |
| Returns element template, nodisplay/static/fieldset. More... | |
| string | getHelpButton () |
| template type, would cause problems with client side validation so will leave for now More... | |
| MoodleQuickForm_date_time_selector ($elementName=null, $elementLabel=null, $options=array(), $attributes=null) | |
| Old syntax of class constructor. More... | |
| MoodleQuickForm_group ($elementName=null, $elementLabel=null, $elements=null, $separator=null, $appendName=true) | |
| Old syntax of class constructor. More... | |
| onQuickFormEvent ($event, $arg, &$caller) | |
| Called by HTML_QuickForm whenever form event is made on this element. More... | |
| setElements ($elements) | |
| Sets the grouped elements and hides label. More... | |
| setMoodleForm ($mform) | |
| Stores the form this element was added to This object is later used by MoodleQuickForm_group::createElement(). More... | |
| toHtml () | |
| Returns HTML for advchecbox form element. More... | |
| validateSubmitValue ($values) | |
| Calls the validateSubmitValue function for the containing elements and returns an error string as soon as it finds one. More... | |
Public Attributes | |
| string | $_helpbutton ='' |
| html for help button, if empty then no help | |
Protected Attributes | |
| MoodleQuickForm | $_mform = null |
| array | $_options = array() |
| Options for the element. More... | |
| $_renderedfromtemplate = false | |
| null bool | $_usedcreateelement = true |
| Keeps track of whether the date selector was initialised using createElement or addElement. More... | |
| array | $_wrap = array('', '') |
| These complement separators, they are appended to the resultant HTML. | |
| MoodleQuickForm_date_time_selector::__construct | ( | $elementName = null, |
|
$elementLabel = null, |
|||
$options = array(), |
|||
$attributes = null |
|||
| ) |
Class constructor.
| string | $elementName | Element's name |
| mixed | $elementLabel | Label(s) for an element |
| array | $options | Options to control the element's display |
| mixed | $attributes | Either a typical HTML attribute string or an associative array |
| MoodleQuickForm_date_time_selector::accept | ( | & | $renderer, |
$required = false, |
|||
$error = null |
|||
| ) |
Accepts a renderer.
| HTML_QuickForm_Renderer | $renderer | An HTML_QuickForm_Renderer object |
| bool | $required | Whether a group is required |
| string | $error | An error message associated with a group |
Reimplemented from MoodleQuickForm_group.
| MoodleQuickForm_date_time_selector::export_for_template | ( | renderer_base | $output | ) |
Export for template.
| renderer_base | $output |
| array|stdClass |
Reimplemented from MoodleQuickForm_group.
| MoodleQuickForm_date_time_selector::exportValue | ( | & | $submitValues, |
$assoc = false |
|||
| ) |
Output a timestamp.
Give it the name of the group.
| array | $submitValues | values submitted. |
| bool | $assoc | specifies if returned array is associative |
| array |
|
inherited |
Returns element template, nodisplay/static/fieldset.
| string |
|
inherited |
template type, would cause problems with client side validation so will leave for now
set html for help button
| MoodleQuickForm_date_time_selector::MoodleQuickForm_date_time_selector | ( | $elementName = null, |
|
$elementLabel = null, |
|||
$options = array(), |
|||
$attributes = null |
|||
| ) |
|
inherited |
| MoodleQuickForm_date_time_selector::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 |
| bool |
Reimplemented from MoodleQuickForm_group.
|
inherited |
Sets the grouped elements and hides label.
| array | $elements |
|
inherited |
Stores the form this element was added to This object is later used by MoodleQuickForm_group::createElement().
| null | MoodleQuickForm | $mform |
| MoodleQuickForm_date_time_selector::toHtml | ( | ) |
Returns HTML for advchecbox form element.
| string |
|
inherited |
Calls the validateSubmitValue function for the containing elements and returns an error string as soon as it finds one.
| array | $values | Values of the containing elements. |
| string|null | Validation error message or null. |
Reimplemented in MoodleQuickForm_filetypes.
|
protected |
Options for the element.
startyear => int start of range of years that can be selected stopyear => int last year that can be selected defaulttime => default time value if the field is currently not set timezone => int|float|string (optional) timezone modifier used for edge case only. If not specified, then date is caclulated based on current user timezone. Note: dst will be calculated for string timezones only step => step to increment minutes by optional => if true, show a checkbox beside the date to turn it on (or off)
|
protected |
Keeps track of whether the date selector was initialised using createElement or addElement.
If true, createElement was used signifying the element has been added to a group - see MDL-39187.