\Horde_View_Helper_Form

Abstract class for Horde_View_Helper objects.

All helpers hold a link back to the instance of the view. The undefined property handlers (get()/call() methods) are used to mix helpers together, effectively placing them on the same pane of glass (the view) and allowing any helper to call any other.

Summary

Methods
Properties
Constants
__construct()
__get()
__set()
__call()
formFor()
fieldsFor()
label()
textField()
passwordField()
hiddenField()
fileField()
checkBox()
radioButton()
textArea()
No public properties found
No constants found
No protected methods found
$_view
N/A
No private methods found
$_instanceTag
N/A

Properties

$_view

$_view : \Horde_View

The parent view invoking the helper.

Type

\Horde_View

$_instanceTag

$_instanceTag : 

Type

Methods

__construct()

__construct(\Horde_View  $view) 

Creates a helper for $view.

Parameters

\Horde_View $view

The view to help.

__get()

__get(  $name) 

Proxy on undefined property access (get).

Parameters

$name

__set()

__set(  $name,   $value) 

Proxy on undefined property access (set).

Parameters

$name
$value

__call()

__call(string  $method, array  $args) : mixed

Call chaining so members of the view can be called (including other helpers).

Parameters

string $method

The method.

array $args

The parameters for the method.

Returns

mixed —

The result of the method.

formFor()

formFor(  $objectName) 

Parameters

$objectName

fieldsFor()

fieldsFor(  $objectName) 

Parameters

$objectName

label()

label(  $objectName,   $method,   $text,   $options = array()) 

Returns a label tag tailored for labelling an input field for a specified attribute (identified by $method) on an object assigned to the template (identified by $objectName).

The text of label will default to the attribute name unless you specify it explicitly. Additional options on the label tag can be passed as a hash with $options. These options will be tagged onto the HTML as an HTML element attribute as in the example shown.

Examples:

$this->label('post', 'title'); // =>

$this->label('post', 'title', 'A short title') // =>

$this->label('post', 'title', 'A short title', array('class' => 'title_label')); // =>

Parameters

$objectName
$method
$text
$options

textField()

textField(  $objectName,   $method,   $options = array()) 

Parameters

$objectName
$method
$options

passwordField()

passwordField(  $objectName,   $method,   $options = array()) 

Parameters

$objectName
$method
$options

hiddenField()

hiddenField(  $objectName,   $method,   $options = array()) 

Parameters

$objectName
$method
$options

fileField()

fileField(  $objectName,   $method,   $options = array()) 

Parameters

$objectName
$method
$options

checkBox()

checkBox(  $objectName,   $method,   $options = array(),   $checkedValue = '1',   $uncheckedValue = '0') 

Parameters

$objectName
$method
$options
$checkedValue
$uncheckedValue

radioButton()

radioButton(  $objectName,   $method,   $tagValue,   $options = array()) 

Parameters

$objectName
$method
$tagValue
$options

textArea()

textArea(  $objectName,   $method,   $options = array()) 

Parameters

$objectName
$method
$options