Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.
/lib/form/ -> tags.php (source)

Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 400 and 401]

Tag autocomplete field. Contains 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
File Size: 274 lines (10 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes

MoodleQuickForm_tags:: (4 methods):
  __construct()
  onQuickFormEvent()
  is_tagging_enabled()
  MoodleQuickForm_tags()

name:: (6 methods):
  get_tag_collection()
  toHtml()
  accept()
  load_standard_tags()
  exportValue()
  export_for_template()


Class: MoodleQuickForm_tags  - X-Ref

Form field type for editing tags.

HTML class for editing tags, both standard and not.

__construct($elementName = null, $elementLabel = null, $options = array()   X-Ref
Constructor

param: string $elementName Element name
param: mixed $elementLabel Label(s) for an element
param: array $options Options to control the element's display
param: mixed $attributes Either a typical HTML attribute string or an associative array.

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

is_tagging_enabled()   X-Ref
Checks if tagging is enabled for this itemtype

return: boolean

MoodleQuickForm_tags($elementName = null, $elementLabel = null, $options = array()   X-Ref
Old syntax of class constructor. Deprecated in PHP7.


Class: name  - X-Ref

get_tag_collection()   X-Ref
Finds the tag collection to use for standard tag selector

return: int

toHtml()   X-Ref
Returns HTML for select 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

load_standard_tags()   X-Ref
Internal function to load standard tags


exportValue(&$submitValues, $assoc = false)   X-Ref
Returns a 'safe' element's value

param: array  $submitValues array of submitted values to search
param: bool   $assoc        whether to return the value as associative array
return: mixed

export_for_template(renderer_base $output)   X-Ref
No description