Render a Zend_Form object.
Accepts following options:
- separator: Separator to use between elements
- helper: which view helper to use when rendering form. Should accept three
arguments, string content, a name, and an array of attributes.
Any other options passed will be used as HTML attributes of the form tag.
category |
Zend |
package |
Zend_Form |
subpackage |
Decorator |
copyright |
Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license |
New BSD License |
version |
$Id$ |
inherited_from |
\Zend_Form_Decorator_Abstract |
Methods
Constructor
__construct(array|\Zend_Config $options = null
) : void
Inherited
Accept options during initialization.
inherited_from |
\Zend_Form_Decorator_Interface::__construct() |
Parameters
$options
array
\Zend_Config
Clear all options
clearOptions() : \Zend_Form_Decorator_Abstract
Inherited
inherited_from |
\Zend_Form_Decorator_Interface::clearOptions() |
Returns
\Zend_Form_Decorator_Abstract
Retrieve current element
getElement() : \Zend_Form_Element | \Zend_Form
Inherited
inherited_from |
\Zend_Form_Decorator_Interface::getElement() |
Returns
\Zend_Form_Element
\Zend_Form
Get view helper for rendering form
getHelper() : string
Get option
getOption(string $key) : mixed
Inherited
inherited_from |
\Zend_Form_Decorator_Interface::getOption() |
Parameters
$key
string
Returns
mixed
Retrieve decorator options
getOptions() : array
Assures that form action and method are set, and sets appropriate
encoding type if current method is POST.
inherited_from |
\Zend_Form_Decorator_Abstract::getOptions() |
Returns
array
Retrieve options
getOptions() : array
Inherited
inherited_from |
\Zend_Form_Decorator_Interface::getOptions() |
Returns
array
Determine if decorator should append or prepend content
getPlacement() : string
Inherited
Retrieve separator to use between old and new content
getSeparator() : string
Inherited
Remove single option
removeOption(mixed $key) : void
Inherited
inherited_from |
\Zend_Form_Decorator_Interface::removeOption() |
Parameters
$key
mixed
Render a form
render(string $content) : string
Replaces $content entirely from currently set element.
inherited_from |
\Zend_Form_Decorator_Abstract::render() |
Parameters
$content
string
Returns
string
Decorate content and/or element
render(string $content) : string
Inherited
inherited_from |
\Zend_Form_Decorator_Interface::render() |
Parameters
$content
string
Exceptions
\Zend_Form_Decorator_Exception |
when unimplemented |
Returns
string
Set options from config object
setConfig(\Zend_Config $config) : \Zend_Form_Decorator_Abstract
Inherited
inherited_from |
\Zend_Form_Decorator_Interface::setConfig() |
Parameters
$config
\Zend_Config
Returns
\Zend_Form_Decorator_Abstract
Set current form element
setElement(\Zend_Form_Element|\Zend_Form $element) : \Zend_Form_Decorator_Abstract
Inherited
While the name is "setElement", a form decorator could decorate either
an element or a form object.
inherited_from |
\Zend_Form_Decorator_Interface::setElement() |
Parameters
$element
\Zend_Form_Element
\Zend_Form
Exceptions
\Zend_Form_Decorator_Exception |
on invalid element type |
Returns
\Zend_Form_Decorator_Abstract
Set view helper for rendering form
setHelper(string $helper) : \Zend_Form_Decorator_Form
Parameters
$helper
string
Returns
\Zend_Form_Decorator_Form
Set option
setOption(string $key, mixed $value) : \Zend_Form_Decorator_Abstract
Inherited
inherited_from |
\Zend_Form_Decorator_Interface::setOption() |
Parameters
$key
string
$value
mixed
Returns
\Zend_Form_Decorator_Abstract
Set options
setOptions(array $options) : \Zend_Form_Decorator_Abstract
Inherited
inherited_from |
\Zend_Form_Decorator_Interface::setOptions() |
Parameters
$options
array
Returns
\Zend_Form_Decorator_Abstract
Properties
$_element
$_element : \Zend_Form_Element | \Zend_Form
Default view helper
$_helper : string
Decorator options
$_options : array
Default placement: append
$_placement : string
Separator between new content and old
$_separator : string
Constants
Placement constants
APPEND = 'APPEND'
PREPEND
PREPEND = 'PREPEND'