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

Class: HTML_QuickForm_Renderer_Default

Source Location: /HTML_QuickForm-3.2.14/QuickForm/Renderer/Default.php

Class Overview

HTML_QuickForm_Renderer
   |
   --HTML_QuickForm_Renderer_Default

A concrete renderer for HTML_QuickForm, based on QuickForm 2.x built-in one


Author(s):

Version:

  • Release: 3.2.14

Methods


Child classes:

HTML_QuickForm_Renderer_QuickHtml
A renderer that makes it quick and easy to create customized forms.

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 42]
A concrete renderer for HTML_QuickForm, based on QuickForm 2.x built-in one


[ Top ]


Method Detail

HTML_QuickForm_Renderer_Default (Constructor)   [line 155]

HTML_QuickForm_Renderer_Default HTML_QuickForm_Renderer_Default( )

Constructor
  • Access: public

[ Top ]

clearAllTemplates   [line 477]

void clearAllTemplates( )

Clears all the HTML out of the templates that surround notes, elements, etc.

Useful when you want to use addData() to create a completely custom form look

  • Access: public

[ Top ]

finishForm   [line 194]

void finishForm( HTML_QuickForm &$form)

Called when visiting a form, after processing all form elements Adds required note, form attributes, validation javascript and form content.
  • 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 364]

void finishGroup( HTML_QuickForm_group &$group)

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

Overridden in child classes as:

HTML_QuickForm_Renderer_QuickHtml::finishGroup()
Gets the html for the group element and adds it to the array by calling parent::finishGroup()

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 292]

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

Renders an element Html Called when visiting an element
  • Access: public

Overridden in child classes as:

HTML_QuickForm_Renderer_QuickHtml::renderElement()
Gets the html for an element and adds it to the array by calling parent::renderElement()

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 222]

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 321]

void renderHidden( HTML_QuickForm_element &$element)

Renders an hidden element Called when visiting a hidden element
  • Access: public

Overridden in child classes as:

HTML_QuickForm_Renderer_QuickHtml::renderHidden()
Gets the html for a hidden element and adds it to the array.

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

Parameters:

HTML_QuickForm_element   &$element   —  form element being visited

[ Top ]

renderHtml   [line 333]

void renderHtml( HTML_QuickForm_html &$data)

Called when visiting a raw HTML/text pseudo-element
  • Access: public

Overrides HTML_QuickForm_Renderer::renderHtml() (Called when visiting a raw HTML/text pseudo-element)

Parameters:

HTML_QuickForm_html   &$data   —  element being visited

[ Top ]

setElementTemplate   [line 394]

void setElementTemplate( string $html, [string $element = null])

Sets element template
  • Access: public

Parameters:

string   $html   —  The HTML surrounding an element
string   $element   —  (optional) Name of the element to apply template for

[ Top ]

setFormTemplate   [line 453]

void setFormTemplate( string $html)

Sets form template
  • Access: public

Parameters:

string   $html   —  The HTML surrounding the form tags

[ Top ]

setGroupElementTemplate   [line 429]

void setGroupElementTemplate( string $html, string $group)

Sets element template for elements within a group
  • Access: public

Parameters:

string   $html   —  The HTML surrounding an element
string   $group   —  Name of the group to apply template for

[ Top ]

setGroupTemplate   [line 416]

void setGroupTemplate( string $html, string $group)

Sets template for a group wrapper

This template is contained within a group-as-element template set via setTemplate() and contains group's element templates, set via setGroupElementTemplate()

  • Access: public

Parameters:

string   $html   —  The HTML surrounding group elements
string   $group   —  Name of the group to apply template for

[ Top ]

setHeaderTemplate   [line 441]

void setHeaderTemplate( string $html)

Sets header template
  • Access: public

Parameters:

string   $html   —  The HTML surrounding the header

[ Top ]

setRequiredNoteTemplate   [line 465]

void setRequiredNoteTemplate( string $html)

Sets the note indicating required fields template
  • Access: public

Parameters:

string   $html   —  The HTML surrounding the required note

[ Top ]

startForm   [line 180]

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 347]

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 ]

toHtml   [line 166]

string toHtml( )

returns the HTML generated for the form
  • Access: public

Overridden in child classes as:

HTML_QuickForm_Renderer_QuickHtml::toHtml()
returns the HTML generated for the form

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:59:47 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.