Moodle  2.2.1
http://www.collinsharper.com
HTML_QuickForm_Renderer_Object Class Reference
Inheritance diagram for HTML_QuickForm_Renderer_Object:
Collaboration diagram for HTML_QuickForm_Renderer_Object:

Public Member Functions

 HTML_QuickForm_Renderer_Object ($collecthidden=false)
 toObject ()
 setElementType ($type)
 startForm (&$form)
 renderHeader (&$header)
 renderElement (&$element, $required, $error)
 renderHidden (&$element)
 startGroup (&$group, $required, $error)
 finishGroup (&$group)
 _elementToObject (&$element, $required, $error)
 _storeObject ($elObj)
 setElementStyle ($elementName, $styleName=null)

Data Fields

 $_obj = null
 $_sectionCount
 $_currentSection
 $_currentGroup = null
 $_elementType = 'QuickFormElement'
 $_elementStyles = array()
 $_collectHidden = false

Detailed Description

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

Based on HTML_Quickform_Renderer_Array code

public

Definition at line 30 of file Object.php.


Member Function Documentation

_elementToObject ( &$  element,
required,
error 
)

Creates an object representing an element

private

Parameters:
elementobject An HTML_QuickForm_element object
requiredbool Whether an element is required
errorstring Error associated with the element
Returns:
object

Definition at line 174 of file Object.php.

Here is the caller graph for this function:

_storeObject ( elObj)

Stores an object representation of an element in the form array

private

Parameters:
elObjobject Object representation of an element
Returns:
void

Definition at line 216 of file Object.php.

Here is the caller graph for this function:

finishGroup ( &$  group)

Called when visiting a group, after processing all group elements

Parameters:
objectAn HTML_QuickForm_group object being visited public
Returns:
void

Reimplemented from HTML_QuickForm_Renderer.

Definition at line 159 of file Object.php.

Here is the call graph for this function:

HTML_QuickForm_Renderer_Object ( collecthidden = false)

Constructor

Parameters:
collecthiddenbool true: collect all hidden elements public

Definition at line 81 of file Object.php.

Here is the call graph for this function:

renderElement ( &$  element,
required,
error 
)

Called when visiting an element

Parameters:
objectAn HTML_QuickForm_element object being visited
boolWhether an element is required
stringAn error message associated with an element public
Returns:
void

Reimplemented from HTML_QuickForm_Renderer.

Definition at line 131 of file Object.php.

Here is the call graph for this function:

Here is the caller graph for this function:

renderHeader ( &$  header)

Called when visiting a header element

Parameters:
objectAn HTML_QuickForm_header element being visited public
Returns:
void

Reimplemented from HTML_QuickForm_Renderer.

Definition at line 123 of file Object.php.

renderHidden ( &$  element)

Called when visiting a hidden element

Parameters:
objectAn HTML_QuickForm_hidden object being visited public
Returns:
void

Reimplemented from HTML_QuickForm_Renderer.

Definition at line 141 of file Object.php.

Here is the call graph for this function:

setElementStyle ( elementName,
styleName = null 
)

Definition at line 228 of file Object.php.

setElementType ( type)

Set the class of the form elements. Defaults to QuickformElement.

Parameters:
typestring Name of element class public

Definition at line 102 of file Object.php.

startForm ( &$  form)

Called when visiting a form, before processing any form elements

Parameters:
objectAn HTML_QuickForm object being visited public
Returns:
void

Reimplemented from HTML_QuickForm_Renderer.

Definition at line 107 of file Object.php.

startGroup ( &$  group,
required,
error 
)

Called when visiting a group, before processing any group elements

Parameters:
objectAn HTML_QuickForm_group object being visited
boolWhether a group is required
stringAn error message associated with a group public
Returns:
void

Reimplemented from HTML_QuickForm_Renderer.

Definition at line 150 of file Object.php.

Here is the call graph for this function:

toObject ( )

Return the rendered Object public

Definition at line 92 of file Object.php.


Field Documentation

bool $_collectHidden = false

true: collect all hidden elements into string; false: process them as usual form elements

Definition at line 72 of file Object.php.

object $_currentGroup = null

Object representing current group

Definition at line 54 of file Object.php.

integer $_currentSection

Current section number

Definition at line 48 of file Object.php.

array $_elementStyles = array()

Additional style information for different elements

Definition at line 66 of file Object.php.

object $_elementType = 'QuickFormElement'

Class of Element Objects

Definition at line 60 of file Object.php.

object $_obj = null

The object being generated

Definition at line 36 of file Object.php.

integer $_sectionCount

Number of sections in the form (i.e. number of headers in it)

Definition at line 42 of file Object.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations