Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.
/lib/form/ -> url.php (source)

Differences Between: [Versions 310 and 402] [Versions 310 and 403]

url type form element Contains HTML class for a url type element

Copyright: 2009 Dongsheng Cai <dongsheng@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 223 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 1 file
 lib/form/templatable_form_element.php

Defines 2 classes

MoodleQuickForm_url:: (2 methods):
  __construct()
  MoodleQuickForm_url()

name:: (8 methods):
  setHiddenLabel()
  toHtml()
  getFilePickerHTML()
  getHelpButton()
  getElementTemplateType()
  export_for_template()
  get_force_ltr()
  get_filepicker_unique_id()


Class: MoodleQuickForm_url  - X-Ref

url type form element

HTML class for a url type element
__construct($elementName=null, $elementLabel=null, $attributes=null, $options=null)   X-Ref
Constructor

param: string $elementName Element name
param: mixed $elementLabel Label(s) for an element
param: mixed $attributes Either a typical HTML attribute string or an associative array.
param: array $options data which need to be posted.

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


Class: name  - X-Ref

setHiddenLabel($hiddenLabel)   X-Ref
Sets label to be hidden

param: bool $hiddenLabel sets if label should be hidden

toHtml()   X-Ref
Returns HTML for this form element.

return: string

getFilePickerHTML()   X-Ref
No description

getHelpButton()   X-Ref
get html for help button

return: string html for help button

getElementTemplateType()   X-Ref
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: string

export_for_template(renderer_base $output)   X-Ref
No description

get_force_ltr()   X-Ref
Get force LTR option.

return: bool

get_filepicker_unique_id()   X-Ref
Returns the unique id of the file picker associated with this url element, setting it in the process if not set.

return: string the unique id of the file picker.