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

Class: HTML_QuickForm_Renderer_ObjectFlexy

Source Location: /pear/HTML/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):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 45]
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: $form =& new HTML_QuickForm('form', 'POST'); $template =& new HTML_Template_Flexy(); $renderer =& new HTML_QuickForm_Renderer_ObjectFlexy(&$template); $renderer->setHtmlTemplate("html.html"); $renderer->setLabelTemplate("label.html"); $form->accept($renderer); $view = new StdClass; $view->form = $renderer->toObject(); $template->compile("mytemplate.html");

Based on the code for HTML_QuickForm_Renderer_ArraySmarty




Tags:

author:  Alexey Borzov <borz_off@cs.msu.su>
see:  QuickFormFlexyObject
access:  public


[ Top ]


Class Variables

$label =  ''

[line 77]

Name of template file for form labels



Tags:

see:  setErrorTemplate()

Type:   string


[ Top ]

$_elementIdx =

[line 57]

Current element index


Type:   integer


[ Top ]

$_elementType =  'QuickformFlexyElement'

[line 84]

Class of the element objects, so you can add your own

element methods



Type:   string
Overrides:   Array


[ Top ]

$_flexy =

[line 51]

HTML_Template_Flexy instance


Type:   object


[ Top ]

$_groupElementIdx =  0

[line 63]

The current element index inside a group


Type:   integer


[ Top ]

$_html =  ''

[line 70]

Name of template file for form html



Tags:

see:  setRequiredTemplate()

Type:   string


[ Top ]



Class Methods


constructor HTML_QuickForm_Renderer_ObjectFlexy [line 92]

HTML_QuickForm_Renderer_ObjectFlexy HTML_QuickForm_Renderer_ObjectFlexy( $flexy &$flexy)

Constructor



Tags:

public:  


Parameters:

$flexy   &$flexy   object HTML_Template_Flexy instance

[ Top ]

method renderHeader [line 99]

void renderHeader( &$header)



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

Parameters:

   &$header  

[ Top ]

method setHtmlTemplate [line 213]

void setHtmlTemplate( template $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} <font color="red" size="1">{error:h}</font>
{end:} {html:h}




Tags:

access:  public


Parameters:

template   $template   string Filename of template

[ Top ]

method setLabelTemplate [line 233]

void setLabelTemplate( template $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} <font color="orange" size="1">*</font> {end:} {label:h}




Tags:

access:  public


Parameters:

template   $template   string Filename of template

[ Top ]

method startGroup [line 109]

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



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

Parameters:

   &$group  
   $required  
   $error  

[ Top ]

method _renderHtml [line 244]

void _renderHtml( &$ret)



Parameters:

   &$ret  

[ Top ]

method _renderLabel [line 238]

void _renderLabel( &$ret)



Parameters:

   &$ret  

[ Top ]


Documentation generated on Sun, 08 Jan 2012 17:51:55 +0100 by phpDocumentor 1.4.3