\Pluf_Form_BoundField

A class to store field, widget and data.

Used when rendering a form.

Summary

Methods
Properties
Constants
__construct()
render_w()
labelTag()
autoId()
fieldErrors()
__get()
__toString()
$form
$field
$name
$html_name
$label
$help_text
$errors
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$form

$form : 

Type

$field

$field : 

Type

$name

$name : 

Type

$html_name

$html_name : 

Type

$label

$label : 

Type

$help_text

$help_text : 

Type

$errors

$errors : 

Type

Methods

__construct()

__construct(  $form,   $field,   $name) 

Parameters

$form
$field
$name

render_w()

render_w(  $widget = null,   $attrs = array()) 

Parameters

$widget
$attrs

labelTag()

labelTag(  $contents = null,   $attrs = array()) : string

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

$contents
$attrs

Returns

string —

HTML of the label.

autoId()

autoId() : string

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.

fieldErrors()

fieldErrors() 

Return HTML to display the errors.

__get()

__get(  $prop) 

Overloading of the property access.

Parameters

$prop

__toString()

__toString() 

Render as string.