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

Class: HTML_QuickForm_Renderer_ITStatic

Source Location: /HTML_QuickForm-3.2.13/QuickForm/Renderer/ITStatic.php

Class Overview

HTML_QuickForm_Renderer
   |
   --HTML_QuickForm_Renderer_ITStatic

A static renderer for HTML_QuickForm compatible with HTML_Template_IT and HTML_Template_Sigma.


Author(s):

Version:

  • Release: 3.2.13

Methods


Inherited Variables

Inherited Methods

Class: HTML_QuickForm_Renderer

HTML_QuickForm_Renderer::HTML_QuickForm_Renderer()
Constructor
HTML_QuickForm_Renderer::finishForm()
Called when visiting a form, after processing all form elements
HTML_QuickForm_Renderer::finishGroup()
Called when visiting a group, after processing all group elements
HTML_QuickForm_Renderer::renderElement()
Called when visiting an element
HTML_QuickForm_Renderer::renderHeader()
Called when visiting a header element
HTML_QuickForm_Renderer::renderHidden()
Called when visiting a hidden element
HTML_QuickForm_Renderer::renderHtml()
Called when visiting a raw HTML/text pseudo-element
HTML_QuickForm_Renderer::startForm()
Called when visiting a form, before processing any form elements
HTML_QuickForm_Renderer::startGroup()
Called when visiting a group, before processing any group elements

Class Details

[line 44]
A static renderer for HTML_QuickForm compatible with HTML_Template_IT and HTML_Template_Sigma.

As opposed to the dynamic renderer, this renderer needs every elements and labels in the form to be specified by placeholders at the position you want them to be displayed.



[ Top ]


Method Detail

HTML_QuickForm_Renderer_ITStatic (Constructor)   [line 115]

HTML_QuickForm_Renderer_ITStatic HTML_QuickForm_Renderer_ITStatic( HTML_Template_IT|HTML_Template_Sigma &$tpl)

Constructor

Parameters:

HTML_Template_IT|HTML_Template_Sigma   &$tpl     Template object to use

[ Top ]

finishForm   [line 147]

void finishForm( HTML_QuickForm &$form)

Called when visiting a form, after processing all form elements
  • Access: public

Overrides HTML_QuickForm_Renderer::finishForm() (Called when visiting a form, after processing all form elements)

Parameters:

HTML_QuickForm   &$form     form object being visited

[ Top ]

finishGroup   [line 343]

void finishGroup( HTML_QuickForm_group &$group)

Called when visiting a group, after processing all group elements
  • Access: public

Overrides HTML_QuickForm_Renderer::finishGroup() (Called when visiting a group, after processing all group elements)

Parameters:

HTML_QuickForm_group   &$group     group being visited

[ Top ]

renderElement   [line 198]

void renderElement( HTML_QuickForm_element &$element, bool $required, string $error)

Called when visiting an element
  • Access: public

Overrides HTML_QuickForm_Renderer::renderElement() (Called when visiting an element)

Parameters:

HTML_QuickForm_element   &$element     form element being visited
bool   $required     Whether an element is required
string   $error     An error message associated with an element

[ Top ]

renderHeader   [line 177]

void renderHeader( HTML_QuickForm_header &$header)

Called when visiting a header element
  • Access: public

Overrides HTML_QuickForm_Renderer::renderHeader() (Called when visiting a header element)

Parameters:

HTML_QuickForm_header   &$header     header element being visited

[ Top ]

renderHidden   [line 272]

void renderHidden( HTML_QuickForm_element &$element)

Called when visiting a hidden element
  • Access: public

Overrides HTML_QuickForm_Renderer::renderHidden() (Called when visiting a hidden element)

Parameters:

HTML_QuickForm_element   &$element     hidden element being visited

[ Top ]

setErrorTemplate   [line 390]

void setErrorTemplate( string $template)

Sets the way elements with validation errors are rendered

You can use {label} or {html} placeholders to let the renderer know where where the element label or the element html are positionned according to the error message. They will be replaced accordingly with the right value. The error message will replace the {error} place holder. For example: <font color="red">{error}</font>
{html} will put the error message in red on top of the element html.

If you want all error messages to be output in the main error block, do not specify {html} nor {label}.

Groups can have special layouts. With this kind of groups, the renderer will need to know where to place the error message. In this case, use error blocks like: <!-- BEGIN form_group_error -->{form_group_error}<!-- END form_group_error --> where you want the error message to appear in the form.

  • Access: public

Parameters:

string   $template     The element error template

[ Top ]

setRequiredTemplate   [line 362]

void setRequiredTemplate( string $template)

Sets the way required elements are rendered

You can use {label} or {html} placeholders to let the renderer know where where the element label or the element html are positionned according to the required tag. They will be replaced accordingly with the right value. For example: <font color="red">*</font>{label} will put a red star in front of the label if the element is required.

  • Access: public

Parameters:

string   $template     The required element template

[ Top ]

startForm   [line 128]

void startForm( HTML_QuickForm &$form)

Called when visiting a form, before processing any form elements
  • Access: public

Overrides HTML_QuickForm_Renderer::startForm() (Called when visiting a form, before processing any form elements)

Parameters:

HTML_QuickForm   &$form     form object being visited

[ Top ]

startGroup   [line 292]

void startGroup( HTML_QuickForm_group &$group, bool $required, string $error)

Called when visiting a group, before processing any group elements
  • Access: public

Overrides HTML_QuickForm_Renderer::startGroup() (Called when visiting a group, before processing any group elements)

Parameters:

HTML_QuickForm_group   &$group     group being visited
bool   $required     Whether a group is required
string   $error     An error message associated with a group

[ Top ]


Documentation generated on Sat, 01 Oct 2011 09:00:14 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.