Pluf_Form_BoundField Class Reference

List of all members.

Public Member Functions

 __construct ($form, $field, $name)
 render_w ($widget=null, $attrs=array())
 labelTag ($contents=null, $attrs=array())
 autoId ()
 fieldErrors ()
 __get ($prop)
 __toString ()

Public Attributes

 $form = null
 $field = null
 $name = null
 $html_name = null
 $label = null
 $help_text = null
 $errors = array()


Detailed Description

A class to store field, widget and data.

Used when rendering a form.


Constructor & Destructor Documentation

Pluf_Form_BoundField::__construct ( form,
field,
name 
)


Member Function Documentation

Pluf_Form_BoundField::render_w ( widget = null,
attrs = array() 
)

Pluf_Form_BoundField::labelTag ( contents = null,
attrs = array() 
)

Returns the HTML of the label tag. Wraps the given contents in a <label>, if the field has an ID attribute. Does not HTML-escape the contents. If contents aren't given, uses the field's HTML-escaped label. If attrs are given, they're used as HTML attributes on the <label> tag.

Parameters:
string Content of the label, will not be escaped (null).
array Extra attributes.
Returns:
string HTML of the label.

Pluf_Form_BoundField::autoId (  ) 

Calculates and returns the ID attribute for this BoundField, if the associated Form has specified auto_id. Returns an empty string otherwise.

Returns:
string Id or empty string if no auto id defined.

Pluf_Form_BoundField::fieldErrors (  ) 

Return HTML to display the errors.

Pluf_Form_BoundField::__get ( prop  ) 

Overloading of the property access.

Pluf_Form_BoundField::__toString (  ) 

Render as string.


Member Data Documentation

Pluf_Form_BoundField::$form = null

Pluf_Form_BoundField::$field = null

Pluf_Form_BoundField::$name = null

Pluf_Form_BoundField::$html_name = null

Pluf_Form_BoundField::$label = null

Pluf_Form_BoundField::$help_text = null

Pluf_Form_BoundField::$errors = array()


The documentation for this class was generated from the following file:

Generated on Wed Feb 3 15:44:52 2010 for Pluf by  doxygen