[ Index ]
 

Code source de phpMyVisites 2.3

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/libs/Html/QuickForm/Renderer/ -> ITStatic.php (sommaire)

(pas de description)

Poids: 490 lignes (18 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

HTML_QuickForm_Renderer_ITStatic:: (13 méthodes):
  HTML_QuickForm_Renderer_ITStatic()
  startForm()
  finishForm()
  renderHeader()
  renderElement()
  renderHidden()
  startGroup()
  finishGroup()
  setRequiredTemplate()
  setErrorTemplate()
  _renderRequired()
  _renderError()
  _getTplBlock()


Classe: HTML_QuickForm_Renderer_ITStatic  - X-Ref

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.

HTML_QuickForm_Renderer_ITStatic(&$tpl)   X-Ref
Constructor

param: object     An HTML_Template_IT or other compatible Template object to use

startForm(&$form)   X-Ref
Called when visiting a form, before processing any form elements

param: object      An HTML_QuickForm object being visited
return: void

finishForm(&$form)   X-Ref
Called when visiting a form, after processing all form elements

param: object     An HTML_QuickForm object being visited
return: void

renderHeader(&$header)   X-Ref
Called when visiting a header element

param: object     An HTML_QuickForm_header element being visited
return: void

renderElement(&$element, $required, $error)   X-Ref
Called when visiting an element

param: object     An HTML_QuickForm_element object being visited
param: bool       Whether an element is required
param: string     An error message associated with an element
return: void

renderHidden(&$element)   X-Ref
Called when visiting a hidden element

param: object     An HTML_QuickForm_hidden object being visited
return: void

startGroup(&$group, $required, $error)   X-Ref
Called when visiting a group, before processing any group elements

param: object     An HTML_QuickForm_group object being visited
param: bool       Whether a group is required
param: string     An error message associated with a group
return: void

finishGroup(&$group)   X-Ref
Called when visiting a group, after processing all group elements

param: object     An HTML_QuickForm_group object being visited
return: void

setRequiredTemplate($template)   X-Ref
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.

param: string      The required element template
return: void

setErrorTemplate($template)   X-Ref
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><br />{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.

param: string      The element error template
return: void

_renderRequired(&$label, &$html)   X-Ref
Called when an element is required

This method will add the required tag to the element label and/or the element html
such as defined with the method setRequiredTemplate

param: string      The element label
param: string      The element html rendering
return: void

_renderError(&$label, &$html, $error)   X-Ref
Called when an element has a validation error

This method will add the error message to the element label or the element html
such as defined with the method setErrorTemplate. If the error placeholder is not found
in the template, the error will be displayed in the form error block.

param: string      The element label
param: string      The element html rendering
param: string      The element error
return: void

_getTplBlock($block)   X-Ref
Returns the block's contents

The method is needed because ITX and Sigma implement clearing
the block contents on get() a bit differently

param: string  Block name
return: string  Block contents



Généré le : Mon Nov 26 14:10:01 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics