select type form element
More...
|
| | __construct ($elementName=null, $elementLabel=null, $options=null, $attributes=null, $linkdata=null) |
| | constructor
|
| |
| | export_for_template (renderer_base $output) |
| | Function to export the renderer data in a format that is suitable for a mustache template.
|
| |
| | exportValue (&$submitValues, $assoc=false) |
| | We check the options and return only the values that could have been selected.
|
| |
| | getElementTemplateType () |
| | Slightly different container template when frozen.
|
| |
| | getHelpButton () |
| | get html for help button
|
| |
| | MoodleQuickForm_selectwithlink ($elementName=null, $elementLabel=null, $options=null, $attributes=null, $linkdata=null) |
| | Old syntax of class constructor.
|
| |
| | removeOption ($value) |
| | Removes an OPTION from the SELECT.
|
| |
|
| removeOptions () |
| | Removes all OPTIONs from the SELECT.
|
| |
| | setHiddenLabel ($hiddenLabel) |
| | Sets label to be hidden.
|
| |
| | toHtml () |
| | Returns the SELECT in HTML.
|
| |
|
|
string | $_helpbutton ='' |
| | html for help button, if empty then no help
|
| |
|
bool | $_hiddenLabel =false |
| | if true label will be hidden
|
| |
|
string | $_link =null |
| | url to which select option will be posted
|
| |
|
string | $_linklabel =null |
| | data which will be posted to link
|
| |
|
string | $_linkreturn =null |
| | url return link
|
| |
select type form element
HTML class for a select type element with options containing link
- Deprecated
- since 3.2
- Copyright
- 2008 Nicolas Connault nicol.nosp@m.asco.nosp@m.nnaul.nosp@m.t@gm.nosp@m.ail.c.nosp@m.om
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
| MoodleQuickForm_selectwithlink::__construct |
( |
| $elementName = null, |
|
|
| $elementLabel = null, |
|
|
| $options = null, |
|
|
| $attributes = null, |
|
|
| $linkdata = null ) |
constructor
- Parameters
-
| string | $elementName | Select name attribute |
| mixed | $elementLabel | Label(s) for the select |
| array | $options | Data to be used to populate options |
| mixed | $attributes | Either a typical HTML attribute string or an associative array |
| bool | $linkdata | data to be posted |
◆ export_for_template()
| MoodleQuickForm_selectwithlink::export_for_template |
( |
renderer_base | $output | ) |
|
Function to export the renderer data in a format that is suitable for a mustache template.
This means:
- No complex types - only stdClass, array, int, string, float, bool
- Any additional info that is required for the template is pre-calculated (e.g. capability checks).
- Parameters
-
| renderer_base | $output | Used to do a final render of any components that need to be rendered for export. |
- Return values
-
Implements templatable.
◆ exportValue()
| MoodleQuickForm_selectwithlink::exportValue |
( |
& | $submitValues, |
|
|
| $assoc = false ) |
We check the options and return only the values that could have been selected.
We also return a scalar value if select is not "multiple"
- Parameters
-
| array | $submitValues | submitted values |
| bool | $assoc | if true the retured value is associated array |
- Return values
-
◆ getElementTemplateType()
| MoodleQuickForm_selectwithlink::getElementTemplateType |
( |
| ) |
|
Slightly different container template when frozen.
Don't want to use a label tag with a for attribute in that case for the element label but instead use a div. Templates are defined in renderer constructor.
- Return values
-
◆ getHelpButton()
| MoodleQuickForm_selectwithlink::getHelpButton |
( |
| ) |
|
get html for help button
- Return values
-
| string | html for help button |
◆ MoodleQuickForm_selectwithlink()
| MoodleQuickForm_selectwithlink::MoodleQuickForm_selectwithlink |
( |
| $elementName = null, |
|
|
| $elementLabel = null, |
|
|
| $options = null, |
|
|
| $attributes = null, |
|
|
| $linkdata = null ) |
◆ removeOption()
| MoodleQuickForm_selectwithlink::removeOption |
( |
| $value | ) |
|
Removes an OPTION from the SELECT.
- Parameters
-
| string | $value | Value for the OPTION to remove |
◆ setHiddenLabel()
| MoodleQuickForm_selectwithlink::setHiddenLabel |
( |
| $hiddenLabel | ) |
|
Sets label to be hidden.
- Parameters
-
| bool | $hiddenLabel | sets if label should be hidden |
◆ toHtml()
| MoodleQuickForm_selectwithlink::toHtml |
( |
| ) |
|
Returns the SELECT in HTML.
- Return values
-
The documentation for this class was generated from the following file:
- lib/form/selectwithlink.php