Form field type for editing tags.
More...
|
| | __construct ($elementName=null, $elementLabel=null, $options=array(), $attributes=null) |
| | Constructor.
|
| |
| | accept (&$renderer, $required=false, $error=null) |
| | Accepts a renderer.
|
| |
| | 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) |
| | Returns a 'safe' element's value.
|
| |
| | getElementTemplateType () |
| | Slightly different container template when frozen.
|
| |
| | getHelpButton () |
| | get html for help button
|
| |
| | MoodleQuickForm_autocomplete ($elementName=null, $elementLabel=null, $options=null, $attributes=null) |
| | Old syntax of class constructor.
|
| |
| | MoodleQuickForm_select ($elementName=null, $elementLabel=null, $options=null, $attributes=null) |
| | Old syntax of class constructor.
|
| |
| | MoodleQuickForm_tags ($elementName=null, $elementLabel=null, $options=array(), $attributes=null) |
| | Old syntax of class constructor.
|
| |
| | onQuickFormEvent ($event, $arg, &$caller) |
| | Called by HTML_QuickForm whenever form event is made on this element.
|
| |
| | optionExists ($value) |
| | Search the current list of options to see if there are any options with this value.
|
| |
| | removeOption ($value) |
| | Removes an OPTION from the SELECT.
|
| |
|
| removeOptions () |
| | Removes all OPTIONs from the SELECT.
|
| |
| | setHiddenLabel ($hiddenLabel) |
| | Sets label to be hidden.
|
| |
| | setValue ($value) |
| | Set the value of this element.
|
| |
| | toHtml () |
| | Returns HTML for select form element.
|
| |
|
|
string | $_helpbutton ='' |
| | html for help button, if empty then no help
|
| |
|
bool | $_hiddenLabel =false |
| | if true label will be hidden
|
| |
| int const | DEFAULTUI = 'defaultui' |
| | Inidcates that the user should be the usual interface, with the official tags listed seprately, and a text box where they can type anything.
|
| |
| int const | NOOFFICIAL = 'noofficial' |
| | Indicates that the user should just be given a text box to type in (they can still type official tags though.
|
| |
| int const | ONLYOFFICIAL = 'onlyofficial' |
| | Indicates that the user should only be allowed to select official tags.
|
| |
|
| | get_tag_collection () |
| | Finds the tag collection to use for standard tag selector.
|
| |
| | is_tagging_enabled () |
| | Checks if tagging is enabled for this itemtype.
|
| |
|
| load_standard_tags () |
| | Internal function to load standard tags.
|
| |
|
|
string | $ajax = '' |
| | $ajax Name of an AMD module to send/process ajax requests.
|
| |
|
bool | $casesensitive = false |
| | $casesensitive Whether the search has to be case-sensitive.
|
| |
|
string | $noselectionstring = '' |
| | $noselectionstring String that is shown when there are no selections.
|
| |
|
string | $placeholder = '' |
| | $placeholder Placeholder text for an empty list.
|
| |
| boolean | $showstandard = false |
| | $showstandard Standard tags suggested?
|
| |
|
bool | $showsuggestions = true |
| | $showsuggestions Show suggestions by default - but this can be turned off.
|
| |
|
boolean | $tags = false |
| | $tags Should we allow typing new entries to the field?
|
| |
|
array | $tagsoptions = array() |
| | Options passed when creating an element.
|
| |
|
callable null | $valuehtmlcallback = null |
| | Function to call (with existing value) to render it to HTML.
|
| |
Form field type for editing tags.
HTML class for editing tags, both standard and not.
- Copyright
- 2009 Tim Hunt
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
| MoodleQuickForm_tags::__construct |
( |
| $elementName = null, |
|
|
| $elementLabel = null, |
|
|
| $options = array(), |
|
|
| $attributes = null ) |
Constructor.
- Parameters
-
| string | $elementName | Element 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. |
Reimplemented from MoodleQuickForm_autocomplete.
◆ accept()
| MoodleQuickForm_tags::accept |
( |
& | $renderer, |
|
|
| $required = false, |
|
|
| $error = null ) |
Accepts a renderer.
- Parameters
-
| 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 |
◆ export_for_template()
| MoodleQuickForm_tags::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
-
Reimplemented from MoodleQuickForm_autocomplete.
◆ exportValue()
| MoodleQuickForm_tags::exportValue |
( |
& | $submitValues, |
|
|
| $assoc = false ) |
Returns a 'safe' element's value.
- Parameters
-
| array | $submitValues | array of submitted values to search |
| bool | $assoc | whether to return the value as associative array |
- Return values
-
Reimplemented from MoodleQuickForm_autocomplete.
◆ get_tag_collection()
| MoodleQuickForm_tags::get_tag_collection |
( |
| ) |
|
|
protected |
Finds the tag collection to use for standard tag selector.
- Return values
-
◆ getElementTemplateType()
| MoodleQuickForm_select::getElementTemplateType |
( |
| ) |
|
|
inherited |
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_select::getHelpButton |
( |
| ) |
|
|
inherited |
get html for help button
- Return values
-
| string | html for help button |
◆ is_tagging_enabled()
| MoodleQuickForm_tags::is_tagging_enabled |
( |
| ) |
|
|
protected |
Checks if tagging is enabled for this itemtype.
- Return values
-
◆ MoodleQuickForm_autocomplete()
| MoodleQuickForm_autocomplete::MoodleQuickForm_autocomplete |
( |
| $elementName = null, |
|
|
| $elementLabel = null, |
|
|
| $options = null, |
|
|
| $attributes = null ) |
|
inherited |
◆ MoodleQuickForm_select()
| MoodleQuickForm_select::MoodleQuickForm_select |
( |
| $elementName = null, |
|
|
| $elementLabel = null, |
|
|
| $options = null, |
|
|
| $attributes = null ) |
|
inherited |
◆ MoodleQuickForm_tags()
| MoodleQuickForm_tags::MoodleQuickForm_tags |
( |
| $elementName = null, |
|
|
| $elementLabel = null, |
|
|
| $options = array(), |
|
|
| $attributes = null ) |
◆ onQuickFormEvent()
| MoodleQuickForm_tags::onQuickFormEvent |
( |
| $event, |
|
|
| $arg, |
|
|
& | $caller ) |
Called by HTML_QuickForm whenever form event is made on this element.
- Parameters
-
| string | $event | Name of event |
| mixed | $arg | event arguments |
| object | $caller | calling object |
- Return values
-
Reimplemented from MoodleQuickForm_autocomplete.
◆ optionExists()
| MoodleQuickForm_autocomplete::optionExists |
( |
| $value | ) |
|
|
inherited |
Search the current list of options to see if there are any options with this value.
- Parameters
-
- Return values
-
◆ removeOption()
| MoodleQuickForm_select::removeOption |
( |
| $value | ) |
|
|
inherited |
Removes an OPTION from the SELECT.
- Parameters
-
| string | $value | Value for the OPTION to remove |
- Return values
-
◆ setHiddenLabel()
| MoodleQuickForm_select::setHiddenLabel |
( |
| $hiddenLabel | ) |
|
|
inherited |
Sets label to be hidden.
- Parameters
-
| bool | $hiddenLabel | sets if label should be hidden |
◆ setValue()
| MoodleQuickForm_autocomplete::setValue |
( |
| $value | ) |
|
|
inherited |
◆ toHtml()
| MoodleQuickForm_tags::toHtml |
( |
| ) |
|
◆ $showstandard
| boolean MoodleQuickForm_tags::$showstandard = false |
|
protected |
$showstandard Standard tags suggested?
(if not, then don't show link to manage standard tags).
◆ DEFAULTUI
| int const MoodleQuickForm_tags::DEFAULTUI = 'defaultui' |
Inidcates that the user should be the usual interface, with the official tags listed seprately, and a text box where they can type anything.
- Deprecated
- since 3.1
◆ NOOFFICIAL
| int const MoodleQuickForm_tags::NOOFFICIAL = 'noofficial' |
Indicates that the user should just be given a text box to type in (they can still type official tags though.
- Deprecated
- since 3.1
◆ ONLYOFFICIAL
| int const MoodleQuickForm_tags::ONLYOFFICIAL = 'onlyofficial' |
Indicates that the user should only be allowed to select official tags.
- Deprecated
- since 3.1
The documentation for this class was generated from the following file: