Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

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

(no description)

File Size: 440 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 4 classes

HTML_QuickForm_Renderer_Object:: (2 methods):
  __construct()
  HTML_QuickForm_Renderer_Object()

name:: (11 methods):
  toObject()
  setElementType()
  startForm()
  renderHeader()
  renderElement()
  renderHidden()
  startGroup()
  finishGroup()
  _elementToObject()
  _storeObject()
  setElementStyle()

QuickformForm:: (2 methods):
  outputHeader()
  outputJavaScript()

QuickformElement:: (4 methods):
  isType()
  notFrozen()
  isButton()
  outputStyle()


Class: HTML_QuickForm_Renderer_Object  - X-Ref

A concrete renderer for HTML_QuickForm, makes an object from form contents

Based on HTML_Quickform_Renderer_Array code

__construct($collecthidden = false)   X-Ref
Constructor

param: collecthidden bool    true: collect all hidden elements

HTML_QuickForm_Renderer_Object($collecthidden = false)   X-Ref
Old syntax of class constructor. Deprecated in PHP7.


Class: name  - X-Ref

toObject()   X-Ref
Return the rendered Object


setElementType($type)   X-Ref
Set the class of the form elements.  Defaults to QuickformElement.

param: type string   Name of element class

startForm(&$form)   X-Ref
No description

renderHeader(&$header)   X-Ref
No description

renderElement(&$element, $required, $error)   X-Ref
No description

renderHidden(&$element)   X-Ref
No description

startGroup(&$group, $required, $error)   X-Ref
No description

finishGroup(&$group)   X-Ref
No description

_elementToObject(&$element, $required, $error)   X-Ref
Creates an object representing an element

param: element object    An HTML_QuickForm_element object
param: required bool         Whether an element is required
param: error string    Error associated with the element
return: object

_storeObject($elObj)   X-Ref
Stores an object representation of an element in the form array

param: elObj object     Object representation of an element
return: void

setElementStyle($elementName, $styleName = null)   X-Ref
No description

Class: QuickformForm  - X-Ref

Convenience class for the form object passed to outputObject()

Eg.
{form.outputJavaScript():h}
{form.outputHeader():h}
<table>
<tr>
<td>{form.name.label:h}</td><td>{form.name.html:h}</td>
</tr>
</table>
</form>
outputHeader()   X-Ref
Output &lt;form&gt; header
{form.outputHeader():h}

return: string    &lt;form attributes&gt;

outputJavaScript()   X-Ref
Output form javascript
{form.outputJavaScript():h}

return: string    Javascript

Class: QuickformElement  - X-Ref

Convenience class describing a form element.
The properties defined here will be available from
your flexy templates by referencing
{form.zip.label:h}, {form.zip.html:h}, etc.

isType($type)   X-Ref
If element is a group, an array of subelements


notFrozen()   X-Ref
No description

isButton()   X-Ref
No description

outputStyle()   X-Ref
XXX: why does it use Flexy when all other stuff here does not depend on it?