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

Class: HTML_QuickForm_Renderer_QuickHtml

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

Class Overview

HTML_QuickForm_Renderer
   |
   --HTML_QuickForm_Renderer_Default
      |
      --HTML_QuickForm_Renderer_QuickHtml

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


Author(s):

Version:

  • Release: 3.2.14

Variables

Methods


Inherited Variables

Inherited Methods

Class: HTML_QuickForm_Renderer_Default

HTML_QuickForm_Renderer_Default::HTML_QuickForm_Renderer_Default()
Constructor
HTML_QuickForm_Renderer_Default::clearAllTemplates()
Clears all the HTML out of the templates that surround notes, elements, etc.
HTML_QuickForm_Renderer_Default::finishForm()
Called when visiting a form, after processing all form elements Adds required note, form attributes, validation javascript and form content.
HTML_QuickForm_Renderer_Default::finishGroup()
Called when visiting a group, after processing all group elements
HTML_QuickForm_Renderer_Default::renderElement()
Renders an element Html Called when visiting an element
HTML_QuickForm_Renderer_Default::renderHeader()
Called when visiting a header element
HTML_QuickForm_Renderer_Default::renderHidden()
Renders an hidden element Called when visiting a hidden element
HTML_QuickForm_Renderer_Default::renderHtml()
Called when visiting a raw HTML/text pseudo-element
HTML_QuickForm_Renderer_Default::setElementTemplate()
Sets element template
HTML_QuickForm_Renderer_Default::setFormTemplate()
Sets form template
HTML_QuickForm_Renderer_Default::setGroupElementTemplate()
Sets element template for elements within a group
HTML_QuickForm_Renderer_Default::setGroupTemplate()
Sets template for a group wrapper
HTML_QuickForm_Renderer_Default::setHeaderTemplate()
Sets header template
HTML_QuickForm_Renderer_Default::setRequiredNoteTemplate()
Sets the note indicating required fields template
HTML_QuickForm_Renderer_Default::startForm()
Called when visiting a form, before processing any form elements
HTML_QuickForm_Renderer_Default::startGroup()
Called when visiting a group, before processing any group elements
HTML_QuickForm_Renderer_Default::toHtml()
returns the HTML generated for the form

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 renderer that makes it quick and easy to create customized forms.

This renderer has three main distinctives: an easy way to create custom-looking forms, the ability to separate the creation of form elements from their display, and being able to use QuickForm in widget-based template systems. See the online docs for more info. For a usage example see: docs/renderers/QuickHtml_example.php



[ Top ]


Class Variables

$renderedElements = array()

[line 51]

The array of rendered elements

Type:   array


[ Top ]



Method Detail

HTML_QuickForm_Renderer_QuickHtml (Constructor)   [line 62]

void HTML_QuickForm_Renderer_QuickHtml( )

Constructor
  • Access: public

[ Top ]

elementToHtml   [line 110]

string elementToHtml( string $elementName, [string $elementValue = null])

Gets the html for an element and marks it as rendered.
  • Return: The html for the QuickForm element
  • Throws: HTML_QuickForm_Error
  • Access: public

Parameters:

string   $elementName   —  The element name
string   $elementValue   —  (optional) The value of the element. This is only useful for elements that have the same name (i.e. radio and checkbox), but different values

[ Top ]

finishGroup   [line 199]

void finishGroup( HTML_QuickForm_group &$group)

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

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

Parameters:

HTML_QuickForm_group   &$group   —  group being visited

[ Top ]

renderElement   [line 155]

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

Gets the html for an element and adds it to the array by calling parent::renderElement()
  • Return: HTML string of element if $immediateRender is set, else we just add the html to the global _html string
  • Access: public

Overrides HTML_QuickForm_Renderer_Default::renderElement() (Renders an element Html 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 ]

renderHidden   [line 179]

void renderHidden( HTML_QuickForm_element &$element)

Gets the html for a hidden element and adds it to the array.
  • Access: public

Overrides HTML_QuickForm_Renderer_Default::renderHidden() (Renders an hidden element Called when visiting a hidden element)

Parameters:

HTML_QuickForm_element   &$element   —  hidden form element being visited

[ Top ]

toHtml   [line 80]

string toHtml( [string $data = ''])

returns the HTML generated for the form
  • Access: public

Overrides HTML_QuickForm_Renderer_Default::toHtml() (returns the HTML generated for the form)

Parameters:

string   $data   —  (optional) Any extra data to put before the end of the form

[ Top ]


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