HTML_QuickForm2
[ class tree: HTML_QuickForm2 ] [ index: HTML_QuickForm2 ] [ all elements ]

Class: HTML_QuickForm2_Renderer_Stub

Source Location: /HTML_QuickForm2-2.1.0/HTML/QuickForm2/Renderer/Stub.php

Class Overview

HTML_QuickForm2_Renderer
   |
   --HTML_QuickForm2_Renderer_Stub

A stub renderer to use with HTML_QuickForm2 when actual form output is done manually


Author(s):

Version:

  • Release: 2.1.0

Variables

Methods


Inherited Variables

Inherited Methods

Class: HTML_QuickForm2_Renderer

HTML_QuickForm2_Renderer::__construct()
Constructor
HTML_QuickForm2_Renderer::exportMethods()
Returns an array of "published" method names that should be callable through proxy
HTML_QuickForm2_Renderer::factory()
Creates a new renderer instance of the given type
HTML_QuickForm2_Renderer::finishContainer()
Finishes rendering a generic container, called after processing contained elements
HTML_QuickForm2_Renderer::finishForm()
Finishes rendering a form, called after processing contained elements
HTML_QuickForm2_Renderer::finishGroup()
Finishes rendering a group, called after processing grouped elements
HTML_QuickForm2_Renderer::getJavascriptBuilder()
Returns the javascript builder object
HTML_QuickForm2_Renderer::getOption()
Returns the value(s) of the renderer option(s)
HTML_QuickForm2_Renderer::methodExists()
Checks whether a method is available in this object
HTML_QuickForm2_Renderer::register()
Registers a new renderer type
HTML_QuickForm2_Renderer::registerPlugin()
Registers a plugin for a renderer type
HTML_QuickForm2_Renderer::renderElement()
Renders a generic element
HTML_QuickForm2_Renderer::renderHidden()
Renders a hidden element
HTML_QuickForm2_Renderer::reset()
Resets the accumulated data
HTML_QuickForm2_Renderer::setJavascriptBuilder()
Sets the javascript builder object
HTML_QuickForm2_Renderer::setOption()
Sets the option(s) affecting renderer behaviour
HTML_QuickForm2_Renderer::startContainer()
Starts rendering a generic container, called before processing contained elements
HTML_QuickForm2_Renderer::startForm()
Starts rendering a form, called before processing contained elements
HTML_QuickForm2_Renderer::startGroup()
Starts rendering a group, called before processing grouped elements

Class Details

[line 58]
A stub renderer to use with HTML_QuickForm2 when actual form output is done manually

The rendering step is mandatory if the form uses client-side validation or contains Javascript-backed elements. Using Array or Default renderer will add unnecessary overhead if such a form will later be output by e.g. echoing form elements in PHP-based template.

This renderer does almost no form processing, serving as a container for JavascriptBuilder instance. The only processing it does is grouping errors and hidden elements if the relevant 'group_hiddens' and 'group_errors' options are set to true. It also checks whether the form contains required elements (and thus needs a required note).

While almost everything in this class is defined as public, its properties and those methods that are not published (i.e. not in array returned by exportMethods()) will be available to renderer plugins only.

The following methods are published:



[ Top ]


Class Variables

$errors = array()

[line 64]

Form errors if 'group_errors' option is true
  • Access: public

Type:   array


[ Top ]

$hidden = array()

[line 70]

Hidden elements if 'group_hiddens' option is true
  • Access: public

Type:   array


[ Top ]

$required =  false

[line 76]

Whether the form contains required elements
  • Access: public

Type:   bool


[ Top ]



Method Detail

exportMethods   [line 78]

void exportMethods( )

  • Access: protected

Overrides HTML_QuickForm2_Renderer::exportMethods() (Returns an array of "published" method names that should be callable through proxy)
[ Top ]

finishContainer   [line 187]

void finishContainer( HTML_QuickForm2_Node $container)

Finishes rendering a generic container, called after processing contained elements
  • Access: public

Overrides HTML_QuickForm2_Renderer::finishContainer() (Finishes rendering a generic container, called after processing contained elements)

Parameters:

HTML_QuickForm2_Node   $container   —  Container being rendered

[ Top ]

finishForm   [line 168]

void finishForm( HTML_QuickForm2_Node $form)

Finishes rendering a form, called after processing contained elements
  • Access: public

Overrides HTML_QuickForm2_Renderer::finishForm() (Finishes rendering a form, called after processing contained elements)

Parameters:

HTML_QuickForm2_Node   $form   —  Form being rendered

[ Top ]

finishGroup   [line 206]

void finishGroup( HTML_QuickForm2_Node $group)

Finishes rendering a group, called after processing grouped elements
  • Access: public

Overrides HTML_QuickForm2_Renderer::finishGroup() (Finishes rendering a group, called after processing grouped elements)

Parameters:

HTML_QuickForm2_Node   $group   —  Group being rendered

[ Top ]

getErrors   [line 92]

array getErrors( )

Returns validation errors if 'group_errors' option is true
  • Return: array('element id' => 'error message')
  • Access: public

[ Top ]

getHidden   [line 102]

array getHidden( )

Returns hidden elements' HTML if 'group_hiddens' option is true
  • Access: public

[ Top ]

hasRequired   [line 112]

bool hasRequired( )

Checks whether form contains required elements
  • Access: public

[ Top ]

renderElement   [line 131]

void renderElement( HTML_QuickForm2_Node $element)

Renders a generic element
  • Access: public

Overrides HTML_QuickForm2_Renderer::renderElement() (Renders a generic element)

Parameters:

HTML_QuickForm2_Node   $element   —  Element being rendered

[ Top ]

renderHidden   [line 146]

void renderHidden( HTML_QuickForm2_Node $element)

Renders a hidden element
  • Access: public

Overrides HTML_QuickForm2_Renderer::renderHidden() (Renders a hidden element)

Parameters:

HTML_QuickForm2_Node   $element   —  Hidden element being rendered

[ Top ]

reset   [line 117]

void reset( )

  • Access: public

Overrides HTML_QuickForm2_Renderer::reset() (Resets the accumulated data)
[ Top ]

startContainer   [line 178]

void startContainer( HTML_QuickForm2_Node $container)

Starts rendering a generic container, called before processing contained elements
  • Access: public

Overrides HTML_QuickForm2_Renderer::startContainer() (Starts rendering a generic container, called before processing contained elements)

Parameters:

HTML_QuickForm2_Node   $container   —  Container being rendered

[ Top ]

startForm   [line 158]

void startForm( HTML_QuickForm2_Node $form)

Starts rendering a form, called before processing contained elements
  • Access: public

Overrides HTML_QuickForm2_Renderer::startForm() (Starts rendering a form, called before processing contained elements)

Parameters:

HTML_QuickForm2_Node   $form   —  Form being rendered

[ Top ]

startGroup   [line 197]

void startGroup( HTML_QuickForm2_Node $group)

Starts rendering a group, called before processing grouped elements
  • Access: public

Overrides HTML_QuickForm2_Renderer::startGroup() (Starts rendering a group, called before processing grouped elements)

Parameters:

HTML_QuickForm2_Node   $group   —  Group being rendered

[ Top ]


Documentation generated on Wed, 10 Apr 2019 08:56:11 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.