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

Class: HTML_QuickForm_Renderer_ObjectFlexy

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

Class Overview

HTML_QuickForm_Renderer
   |
   --HTML_QuickForm_Renderer_Object
      |
      --HTML_QuickForm_Renderer_ObjectFlexy

QuickForm renderer for Flexy template engine, static version.


Author(s):

Version:

  • Release: 3.2.14

Methods


Inherited Variables

Inherited Methods


Class Details

[line 56]
QuickForm renderer for Flexy template engine, static version.

A static renderer for HTML_Quickform. Makes a QuickFormFlexyObject from the form content suitable for use with a Flexy template

Usage:

  1.  $form =new HTML_QuickForm('form''POST');
  2.  $template =new HTML_Template_Flexy();
  3.  $renderer =new HTML_QuickForm_Renderer_ObjectFlexy(&$template);
  4.  $renderer->setHtmlTemplate("html.html");
  5.  $renderer->setLabelTemplate("label.html");
  6.  $form->accept($renderer);
  7.  $view = new StdClass;
  8.  $view->form = $renderer->toObject();
  9.  $template->compile("mytemplate.html");

Based on the code for HTML_QuickForm_Renderer_ArraySmarty

  • Author: Ron McClain <ron@humaniq.com>
  • Version: Release: 3.2.14
  • Since: 3.1.1


[ Top ]


Method Detail

HTML_QuickForm_Renderer_ObjectFlexy (Constructor)   [line 107]

HTML_QuickForm_Renderer_ObjectFlexy HTML_QuickForm_Renderer_ObjectFlexy( HTML_Template_Flexy &$flexy)

Constructor
  • Public:

Parameters:

HTML_Template_Flexy   &$flexy     template object to use

[ Top ]

renderHeader   [line 114]

void renderHeader( &$header)


Overrides HTML_QuickForm_Renderer_Object::renderHeader() (parent method not documented)

Parameters:

   &$header     

[ Top ]

setHtmlTemplate   [line 230]

void setHtmlTemplate( string $template)

Set the filename of the template to render html elements.

In your template, {html} is replaced by the unmodified html. If the element is required, {required} will be true. Eg.

 {if:error}
   {error:h}
{end:} {html:h}

  • Access: public

Parameters:

string   $template     Filename of template

[ Top ]

setLabelTemplate   [line 252]

void setLabelTemplate( string $template)

Set the filename of the template to render form labels In your template, {label} is replaced by the unmodified label.

{error} will be set to the error, if any. {required} will be true if this is a required field Eg.

 {if:required}
 *
 {end:}
 {label:h}

  • Access: public

Parameters:

string   $template     Filename of template

[ Top ]

startGroup   [line 124]

void startGroup( &$group, $required, $error)


Overrides HTML_QuickForm_Renderer_Object::startGroup() (parent method not documented)

Parameters:

   &$group     
   $required     
   $error     

[ Top ]


Documentation generated on Thu, 20 Nov 2014 16:00:17 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.