API Documentation

Dojo/Form/SubForm.php

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

category
Zend  
copyright
Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Dojo  
subpackage
Form  

\Zend_Dojo_Form_SubForm

Dijit-enabled SubForm

Extends from
\Zend_Form_SubForm
copyright
Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Dojo  
subpackage
Form  
uses
\Zend_Form_SubForm  
version
$Id: SubForm.php 23775 2011-03-01 17:25:24Z ralph $  

Properties

Propertyprotectedbool  $_dojoViewPathRegistered= 'false'

Has the dojo view helper path been registered?

Default valuefalseDetails
Type
bool

Methods

methodpublic__call( string $method, array $args ) : string

Overloading: allow rendering specific decorators

Inherited from: \Zend_Form::__call()

Call renderDecoratorName() to render a specific decorator.

Parameters
Name Type Description
$method string
$args array
Returns
Type Description
string
Throws
Exception Description
\Zend_Form_Exception for invalid decorator or invalid method call
methodpublic__clone( ) : void

Clone form object and all children

Inherited from: \Zend_Form::__clone()
methodpublic__construct( array|\Zend_Config|null $options = null ) : void

Constructor

Registers form view helper as decorator

Parameters
Name Type Description
$options array|\Zend_Config|null
methodpublic__get( string $name ) : \Zend_Form_Element|\Zend_Form|null

Overloading: access to elements, form groups, and display groups

Inherited from: \Zend_Form::__get()
Parameters
Name Type Description
$name string
Returns
Type Description
\Zend_Form_Element\Zend_Formnull
methodpublic__isset( string $name ) : boolean

Overloading: access to elements, form groups, and display groups

Inherited from: \Zend_Form::__isset()
Parameters
Name Type Description
$name string
Returns
Type Description
boolean
methodpublic__set( string $name, \Zend_Form_Element|\Zend_Form $value ) : void

Overloading: access to elements, form groups, and display groups

Inherited from: \Zend_Form::__set()
Parameters
Name Type Description
$name string
$value \Zend_Form_Element|\Zend_Form
Throws
Exception Description
\Zend_Form_Exception for invalid $value
methodpublic__toString( ) : string

Serialize as string

Inherited from: \Zend_Form::__toString()

Proxies to {@link render()}.

Returns
Type Description
string
methodpublic__unset( string $name ) : void

Overloading: access to elements, form groups, and display groups

Inherited from: \Zend_Form::__unset()
Parameters
Name Type Description
$name string
methodprotected_addDisplayGroupObject( \Zend_Form_DisplayGroup $group, string|null $name = null ) : \Zend_Form

Add a display group object (used with cloning)

Inherited from: \Zend_Form::_addDisplayGroupObject()
Parameters
Name Type Description
$group \Zend_Form_DisplayGroup
$name string|null
Returns
Type Description
\Zend_Form
methodprotected_array_replace_recursive( array $into ) : void

This is a helper function until php 5.3 is widespreaded

Inherited from: \Zend_Form::_array_replace_recursive()
Parameters
Name Type Description
$into array
Details
access
protected  
methodprotected_attachToArray( mixed $value, string $arrayPath ) : array

Converts given arrayPath to an array and attaches given value at the end of it.

Inherited from: \Zend_Form::_attachToArray()
Parameters
Name Type Description
$value mixed The value to attach
$arrayPath string Given array path to convert and attach to.
Returns
Type Description
array
methodprotected_dissolveArrayUnsetKey( array $array, string|null $arrayPath, string $key ) : array

Given an array, an optional arrayPath and a key this method dissolves the arrayPath and unsets the key within the array if it exists.

Inherited from: \Zend_Form::_dissolveArrayUnsetKey()
Parameters
Name Type Description
$array array
$arrayPath string|null
$key string
Returns
Type Description
array
methodprotected_dissolveArrayValue( array $value, string $arrayPath ) : string

Extract the value by walking the array using given array path.

Inherited from: \Zend_Form::_dissolveArrayValue()

Given an array path such as foo[bar][baz], returns the value of the last element (in this case, 'baz').

Parameters
Name Type Description
$value array Array to walk
$arrayPath string Array notation path of the part to extract
Returns
Type Description
string
methodprotected_getArrayName( string $value ) : string

Determine array key name from given value

Inherited from: \Zend_Form::_getArrayName()

Given a value such as foo[bar][baz], returns the last element (in this case, 'baz').

Parameters
Name Type Description
$value string
Returns
Type Description
string
methodprotected_getDecorator( string $name, null|array $options ) : \Zend_Form_Decorator_Interface

Instantiate a decorator based on class name or class name fragment

Inherited from: \Zend_Form::_getDecorator()
Parameters
Name Type Description
$name string
$options null|array
Returns
Type Description
\Zend_Form_Decorator_Interface
methodprotected_getErrorMessages( ) : array

Retrieve optionally translated custom error messages

Inherited from: \Zend_Form::_getErrorMessages()
Returns
Type Description
array
methodprotected_getIsRendered( ) : void

Get the value of $_isRendered member

Inherited from: \Zend_Form::_getIsRendered()
methodprotected_loadDecorator( array $decorator, mixed $name ) : \Zend_Form_Decorator_Interface

Lazy-load a decorator

Inherited from: \Zend_Form::_loadDecorator()
Parameters
Name Type Description
$decorator array Decorator type and options
$name mixed Decorator name or alias
Returns
Type Description
\Zend_Form_Decorator_Interface
methodprotected_setElementsBelongTo( string $name = null ) : void

Set array to which elements belong

Inherited from: \Zend_Form::_setElementsBelongTo()
Parameters
Name Type Description
$name string Element name
methodprotected_setIsRendered( ) : void

When calling renderFormElements or render this method is used to set $_isRendered member to prevent repeatedly merging belongsTo setting

Inherited from: \Zend_Form::_setIsRendered()
methodprotected_sort( ) : void

Sort items according to their order

Inherited from: \Zend_Form::_sort()
methodpublicaddAttribs( array $attribs ) : \Zend_Form

Add multiple form attributes at once

Inherited from: \Zend_Form::addAttribs()
Parameters
Name Type Description
$attribs array
Returns
Type Description
\Zend_Form
methodpublicaddDecorator( string|\Zend_Form_Decorator_Interface $decorator, array|\Zend_Config $options = null ) : \Zend_Form

Add a decorator for rendering the element

Inherited from: \Zend_Form::addDecorator()
Parameters
Name Type Description
$decorator string|\Zend_Form_Decorator_Interface
$options array|\Zend_Config Options with which to initialize decorator
Returns
Type Description
\Zend_Form
methodpublicaddDecorators( array $decorators ) : \Zend_Form

Add many decorators at once

Inherited from: \Zend_Form::addDecorators()
Parameters
Name Type Description
$decorators array
Returns
Type Description
\Zend_Form
methodpublicaddDisplayGroup( array $elements, string $name, array|\Zend_Config $options = null ) : \Zend_Form

Add a display group

Inherited from: \Zend_Form::addDisplayGroup()

Groups named elements for display purposes.

If a referenced element does not yet exist in the form, it is omitted.

Parameters
Name Type Description
$elements array
$name string
$options array|\Zend_Config
Returns
Type Description
\Zend_Form
Throws
Exception Description
\Zend_Form_Exception if no valid elements provided
methodpublicaddDisplayGroupPrefixPath( string $prefix, string $path ) : \Zend_Form

Add prefix path for all display groups

Inherited from: \Zend_Form::addDisplayGroupPrefixPath()
Parameters
Name Type Description
$prefix string
$path string
Returns
Type Description
\Zend_Form
methodpublicaddDisplayGroupPrefixPaths( array $spec ) : \Zend_Form

Add multiple display group prefix paths at once

Inherited from: \Zend_Form::addDisplayGroupPrefixPaths()
Parameters
Name Type Description
$spec array
Returns
Type Description
\Zend_Form
methodpublicaddDisplayGroups( array $groups ) : \Zend_Form

Add multiple display groups at once

Inherited from: \Zend_Form::addDisplayGroups()
Parameters
Name Type Description
$groups array
Returns
Type Description
\Zend_Form
methodpublicaddElement( string|\Zend_Form_Element $element, string $name = null, array|\Zend_Config $options = null ) : \Zend_Form

Add a new element

Inherited from: \Zend_Form::addElement()

$element may be either a string element type, or an object of type Zend_Form_Element. If a string element type is provided, $name must be provided, and $options may be optionally provided for configuring the element.

If a Zend_Form_Element is provided, $name may be optionally provided, and any provided $options will be ignored.

Parameters
Name Type Description
$element string|\Zend_Form_Element
$name string
$options array|\Zend_Config
Returns
Type Description
\Zend_Form
Throws
Exception Description
\Zend_Form_Exception on invalid element
methodpublicaddElementPrefixPath( string $prefix, string $path, string $type = null ) : \Zend_Form

Add prefix path for all elements

Inherited from: \Zend_Form::addElementPrefixPath()
Parameters
Name Type Description
$prefix string
$path string
$type string
Returns
Type Description
\Zend_Form
methodpublicaddElementPrefixPaths( array $spec ) : \Zend_Form

Add prefix paths for all elements

Inherited from: \Zend_Form::addElementPrefixPaths()
Parameters
Name Type Description
$spec array
Returns
Type Description
\Zend_Form
methodpublicaddElements( array $elements ) : \Zend_Form

Add multiple elements at once

Inherited from: \Zend_Form::addElements()
Parameters
Name Type Description
$elements array
Returns
Type Description
\Zend_Form
methodpublicaddError( string $message ) : \Zend_Form

Add an error message and mark element as failed validation

Inherited from: \Zend_Form::addError()
Parameters
Name Type Description
$message string
Returns
Type Description
\Zend_Form
methodpublicaddErrorMessage( string $message ) : \Zend_Form

Add a custom error message to return in the event of failed validation

Inherited from: \Zend_Form::addErrorMessage()
Parameters
Name Type Description
$message string
Returns
Type Description
\Zend_Form
methodpublicaddErrorMessages( array $messages ) : \Zend_Form

Add multiple custom error messages to return in the event of failed validation

Inherited from: \Zend_Form::addErrorMessages()
Parameters
Name Type Description
$messages array
Returns
Type Description
\Zend_Form
methodpublicaddErrors( array $messages ) : \Zend_Form

Add multiple error messages and flag element as failed validation

Inherited from: \Zend_Form::addErrors()
Parameters
Name Type Description
$messages array
Returns
Type Description
\Zend_Form
methodpublicaddPrefixPath( string $prefix, string $path, string $type = null ) : \Zend_Form

Add prefix path for plugin loader

Inherited from: \Zend_Form::addPrefixPath()

If no $type specified, assumes it is a base path for both filters and validators, and sets each according to the following rules: - decorators: $prefix = $prefix . '_Decorator' - elements: $prefix = $prefix . '_Element'

Otherwise, the path prefix is set on the appropriate plugin loader.

If $type is 'decorator', sets the path in the decorator plugin loader for all elements. Additionally, if no $type is provided, the prefix and path is added to both decorator and element plugin loader with following settings: $prefix . '_Decorator', $path . '/Decorator/' $prefix . '_Element', $path . '/Element/'

Parameters
Name Type Description
$prefix string
$path string
$type string
Returns
Type Description
\Zend_Form
Throws
Exception Description
\Zend_Form_Exception for invalid type
methodpublicaddPrefixPaths( array $spec ) : \Zend_Form

Add many prefix paths at once

Inherited from: \Zend_Form::addPrefixPaths()
Parameters
Name Type Description
$spec array
Returns
Type Description
\Zend_Form
methodpublicaddSubForm( \Zend_Form $form, string $name, int $order = null ) : \Zend_Form

Add a form group/subform

Inherited from: \Zend_Form::addSubForm()
Parameters
Name Type Description
$form \Zend_Form
$name string
$order int
Returns
Type Description
\Zend_Form
methodpublicaddSubForms( array $subForms ) : \Zend_Form

Add multiple form subForms/subforms at once

Inherited from: \Zend_Form::addSubForms()
Parameters
Name Type Description
$subForms array
Returns
Type Description
\Zend_Form
methodpublicclearAttribs( ) : \Zend_Form

Clear all form attributes

Inherited from: \Zend_Form::clearAttribs()
Returns
Type Description
\Zend_Form
methodpublicclearDecorators( ) : \Zend_Form

Clear all decorators

Inherited from: \Zend_Form::clearDecorators()
Returns
Type Description
\Zend_Form
methodpublicclearDisplayGroups( ) : \Zend_Form

Remove all display groups

Inherited from: \Zend_Form::clearDisplayGroups()
Returns
Type Description
\Zend_Form
methodpublicclearElements( ) : \Zend_Form

Remove all form elements

Inherited from: \Zend_Form::clearElements()
Returns
Type Description
\Zend_Form
methodpublicclearErrorMessages( ) : \Zend_Form

Clear custom error messages stack

Inherited from: \Zend_Form::clearErrorMessages()
Returns
Type Description
\Zend_Form
methodpublicclearSubForms( ) : \Zend_Form

Remove all form subForms/subforms

Inherited from: \Zend_Form::clearSubForms()
Returns
Type Description
\Zend_Form
methodpubliccount( ) : int

Count of elements/subforms that are iterable

Inherited from: \Zend_Form::count()
Returns
Type Description
int
methodpubliccreateElement( string $type, string $name, array|\Zend_Config $options = null ) : \Zend_Form_Element

Create an element

Inherited from: \Zend_Form::createElement()

Acts as a factory for creating elements. Elements created with this method will not be attached to the form, but will contain element settings as specified in the form object (including plugin loader prefix paths, default decorators, etc.).

Parameters
Name Type Description
$type string
$name string
$options array|\Zend_Config
Returns
Type Description
\Zend_Form_Element
methodpubliccurrent( ) : \Zend_Form_Element|\Zend_Form_DisplayGroup|\Zend_Form

Current element/subform/display group

Inherited from: \Zend_Form::current()
methodpublicfilterName( string $value, bool $allowBrackets = false ) : string

Filter a name to only allow valid variable characters

Inherited from: \Zend_Form::filterName()
Parameters
Name Type Description
$value string
$allowBrackets bool
Returns
Type Description
string
methodpublicgetAction( ) : string

Get form action

Inherited from: \Zend_Form::getAction()

Sets default to '' if not set.

Returns
Type Description
string
methodpublicgetAttrib( string $key ) : mixed

Retrieve a single form attribute

Inherited from: \Zend_Form::getAttrib()
Parameters
Name Type Description
$key string
Returns
Type Description
mixed
methodpublicgetAttribs( ) : array

Retrieve all form attributes/metadata

Inherited from: \Zend_Form::getAttribs()
Returns
Type Description
array
methodpublicgetCustomMessages( ) : array

Retrieve translated custom error messages Proxies to {@link _getErrorMessages()}.

Inherited from: \Zend_Form::getCustomMessages()
Returns
Type Description
array
methodpublicgetDecorator( string $name ) : false|\Zend_Form_Decorator_Abstract

Retrieve a registered decorator

Inherited from: \Zend_Form::getDecorator()
Parameters
Name Type Description
$name string
Returns
Type Description
false\Zend_Form_Decorator_Abstract
methodpublicgetDecorators( ) : array

Retrieve all decorators

Inherited from: \Zend_Form::getDecorators()
Returns
Type Description
array
methodpublicgetDefaultDisplayGroupClass( ) : string

Retrieve default display group class

Inherited from: \Zend_Form::getDefaultDisplayGroupClass()
Returns
Type Description
string
methodpublicgetDefaultTranslator( ) : null|\Zend_Translate
static

Get global default translator object

Inherited from: \Zend_Form::getDefaultTranslator()
Returns
Type Description
null\Zend_Translate
methodpublicgetDescription( ) : string

Retrieve form description

Inherited from: \Zend_Form::getDescription()
Returns
Type Description
string
methodpublicgetDisplayGroup( string $name ) : \Zend_Form_DisplayGroup|null

Return a display group

Inherited from: \Zend_Form::getDisplayGroup()
Parameters
Name Type Description
$name string
Returns
Type Description
\Zend_Form_DisplayGroupnull
methodpublicgetDisplayGroups( ) : array

Return all display groups

Inherited from: \Zend_Form::getDisplayGroups()
Returns
Type Description
array
methodpublicgetElement( string $name ) : \Zend_Form_Element|null

Retrieve a single element

Inherited from: \Zend_Form::getElement()
Parameters
Name Type Description
$name string
Returns
Type Description
\Zend_Form_Elementnull
methodpublicgetElements( ) : array

Retrieve all elements

Inherited from: \Zend_Form::getElements()
Returns
Type Description
array
methodpublicgetElementsAndSubFormsOrdered( ) : array

Returns a one dimensional numerical indexed array with the Elements, SubForms and Elements from DisplayGroups as Values.

Inherited from: \Zend_Form::getElementsAndSubFormsOrdered()

Subitems are inserted based on their order Setting if set, otherwise they are appended, the resulting numerical index may differ from the order value.

Returns
Type Description
array
Details
access
protected  
methodpublicgetElementsBelongTo( ) : string|null

Get name of array elements belong to

Inherited from: \Zend_Form::getElementsBelongTo()
Returns
Type Description
stringnull
methodpublicgetEnctype( ) : string

Get encoding type

Inherited from: \Zend_Form::getEnctype()
Returns
Type Description
string
methodpublicgetErrorMessages( ) : array

Retrieve custom error messages

Inherited from: \Zend_Form::getErrorMessages()
Returns
Type Description
array
methodpublicgetErrors( string $name = null,  $suppressArrayNotation = false ) : array

Get error codes for all elements failing validation

Inherited from: \Zend_Form::getErrors()
Parameters
Name Type Description
$name string
$suppressArrayNotation
Returns
Type Description
array
methodpublicgetFullyQualifiedName( ) : string

Get fully qualified name

Inherited from: \Zend_Form::getFullyQualifiedName()

Places name as subitem of array and/or appends brackets.

Returns
Type Description
string
methodpublicgetId( ) : string

Get element id

Inherited from: \Zend_Form::getId()
Returns
Type Description
string
methodpublicgetLegend( ) : string

Get form legend

Inherited from: \Zend_Form::getLegend()
Returns
Type Description
string
methodpublicgetMessages( string $name = null, bool $suppressArrayNotation = false ) : array

Retrieve error messages from elements failing validations

Inherited from: \Zend_Form::getMessages()

If isValid() was never called or if the most recent isValid() call returned true, then this method returns an empty array.

Parameters
Name Type Description
$name string
$suppressArrayNotation bool
Returns
Type Description
array
methodpublicgetMethod( ) : string

Retrieve form method

Inherited from: \Zend_Form::getMethod()
Returns
Type Description
string
methodpublicgetName( ) : null|string

Get name attribute

Inherited from: \Zend_Form::getName()
Returns
Type Description
nullstring
methodpublicgetOrder( ) : int|null

Get form order

Inherited from: \Zend_Form::getOrder()
Returns
Type Description
intnull
methodpublicgetPluginLoader( string $type = null ) : \Zend_Loader_PluginLoader_Interface

Retrieve plugin loader for given type

Inherited from: \Zend_Form::getPluginLoader()

$type may be one of: - decorator - element

If a plugin loader does not exist for the given type, defaults are created.

Parameters
Name Type Description
$type string
Returns
Type Description
\Zend_Loader_PluginLoader_Interface
methodpublicgetSubForm( string $name ) : \Zend_Form|null

Retrieve a form subForm/subform

Inherited from: \Zend_Form::getSubForm()
Parameters
Name Type Description
$name string
Returns
Type Description
\Zend_Formnull
methodpublicgetSubForms( ) : array

Retrieve all form subForms/subforms

Inherited from: \Zend_Form::getSubForms()
Returns
Type Description
array
methodpublicgetTranslator( ) : \Zend_Translate|null

Retrieve translator object

Inherited from: \Zend_Form::getTranslator()
Returns
Type Description
\Zend_Translatenull
methodpublicgetUnfilteredValue( string $name ) : mixed

Get unfiltered element value

Inherited from: \Zend_Form::getUnfilteredValue()
Parameters
Name Type Description
$name string
Returns
Type Description
mixed
methodpublicgetUnfilteredValues( ) : array

Retrieve all unfiltered element values

Inherited from: \Zend_Form::getUnfilteredValues()
Returns
Type Description
array
methodpublicgetValidValues( array $data, bool $suppressArrayNotation = false ) : array

Returns only the valid values from the given form input.

Inherited from: \Zend_Form::getValidValues()

For models that can be saved in a partially valid state, for example when following the builder, prototype or state patterns it is particularly interessting to retrieve all the current valid values to persist them.

Parameters
Name Type Description
$data array
$suppressArrayNotation bool
Returns
Type Description
array
methodpublicgetValue( string $name ) : mixed

Retrieve value for single element

Inherited from: \Zend_Form::getValue()
Parameters
Name Type Description
$name string
Returns
Type Description
mixed
methodpublicgetValues( bool $suppressArrayNotation = false ) : array

Retrieve all form element values

Inherited from: \Zend_Form::getValues()
Parameters
Name Type Description
$suppressArrayNotation bool
Returns
Type Description
array
methodpublicgetView( ) : \Zend_View_Interface

Get view

If none registered, attempts to pull from ViewRenderer.

Returns
Type Description
\Zend_View_Interface
methodpublichasDefaultTranslator( ) : boolean
static

Is there a default translation object set?

Inherited from: \Zend_Form::hasDefaultTranslator()
Returns
Type Description
boolean
methodpublichasTranslator( ) : bool

Does this form have its own specific translator?

Inherited from: \Zend_Form::hasTranslator()
Returns
Type Description
bool
methodpublicinit( ) : void

Initialize form (used by extending classes)

Inherited from: \Zend_Form::init()
methodpublicisArray( ) : bool

Get flag indicating if elements belong to an array

Inherited from: \Zend_Form::isArray()
Returns
Type Description
bool
methodpublicisErrors( ) : bool

Are there errors in the form?

Inherited from: \Zend_Form::isErrors()
Returns
Type Description
bool
methodpublicisValid( array $data ) : boolean

Validate the form

Inherited from: \Zend_Form::isValid()

If $value fails validation, then this method returns false, and getMessages() will return an array of messages that explain why the validation failed.

Parameters
Name Type Description
$data array
Returns
Type Description
boolean
Throws
Exception Description
\Zend_Validate_Exception If validation of $value is impossible
methodpublicisValidPartial( array $data ) : boolean

Validate a partial form

Inherited from: \Zend_Form::isValidPartial()

Does not check for required flags.

Parameters
Name Type Description
$data array
Returns
Type Description
boolean
methodpublickey( ) : string

Current element/subform/display group name

Inherited from: \Zend_Form::key()
Returns
Type Description
string
methodpublicloadDefaultDecorators( ) : void

Load the default decorators

methodpublicloadDefaultDecoratorsIsDisabled( ) : bool

Should we load the default decorators?

Inherited from: \Zend_Form::loadDefaultDecoratorsIsDisabled()
Returns
Type Description
bool
methodpublicmarkAsError( ) : \Zend_Form

Mark the element as being in a failed validation state

Inherited from: \Zend_Form::markAsError()
Returns
Type Description
\Zend_Form
methodpublicnext( ) : void

Move pointer to next element/subform/display group

Inherited from: \Zend_Form::next()
methodpublicpersistData( ) : void

Inherited from: \Zend_Form::persistData()
methodpublicpopulate( array $values ) : \Zend_Form

Populate form

Inherited from: \Zend_Form::populate()

Proxies to {@link setDefaults()}

Parameters
Name Type Description
$values array
Returns
Type Description
\Zend_Form
methodpublicprocessAjax( array $data ) : string

Process submitted AJAX data

Inherited from: \Zend_Form::processAjax()

Checks if provided $data is valid, via {@link isValidPartial()}. If so, it returns JSON-encoded boolean true. If not, it returns JSON-encoded error messages (as returned by {@link getMessages()}).

Parameters
Name Type Description
$data array
Returns
Type Description
string JSON-encoded boolean true or error messages
methodpublicremoveAttrib( string $key ) : bool

Remove attribute

Inherited from: \Zend_Form::removeAttrib()
Parameters
Name Type Description
$key string
Returns
Type Description
bool
methodpublicremoveDecorator( string $name ) : bool

Remove a single decorator

Inherited from: \Zend_Form::removeDecorator()
Parameters
Name Type Description
$name string
Returns
Type Description
bool
methodpublicremoveDisplayGroup( string $name ) : boolean

Remove a display group by name

Inherited from: \Zend_Form::removeDisplayGroup()
Parameters
Name Type Description
$name string
Returns
Type Description
boolean
methodpublicremoveElement( string $name ) : boolean

Remove element

Inherited from: \Zend_Form::removeElement()
Parameters
Name Type Description
$name string
Returns
Type Description
boolean
methodpublicremoveFromIteration( string $name ) : void

Remove an element from iteration

Inherited from: \Zend_Form::removeFromIteration()
Parameters
Name Type Description
$name string

Element/group/form name

methodpublicremoveSubForm( string $name ) : boolean

Remove form subForm/subform

Inherited from: \Zend_Form::removeSubForm()
Parameters
Name Type Description
$name string
Returns
Type Description
boolean
methodpublicrender( \Zend_View_Interface $view = null ) : string

Render form

Inherited from: \Zend_Form::render()
Parameters
Name Type Description
$view \Zend_View_Interface
Returns
Type Description
string
methodpublicreset( ) : \Zend_Form

Reset values of form

Inherited from: \Zend_Form::reset()
Returns
Type Description
\Zend_Form
methodpublicrewind( ) : void

Move pointer to beginning of element/subform/display group loop

Inherited from: \Zend_Form::rewind()
methodpublicsetAction( string $action ) : \Zend_Form

Set form action

Inherited from: \Zend_Form::setAction()
Parameters
Name Type Description
$action string
Returns
Type Description
\Zend_Form
methodpublicsetAttrib( string $key, mixed $value ) : \Zend_Form

Set form attribute

Inherited from: \Zend_Form::setAttrib()
Parameters
Name Type Description
$key string
$value mixed
Returns
Type Description
\Zend_Form
methodpublicsetAttribs( array $attribs ) : \Zend_Form

Set multiple form attributes at once

Inherited from: \Zend_Form::setAttribs()

Overwrites any previously set attributes.

Parameters
Name Type Description
$attribs array
Returns
Type Description
\Zend_Form
methodpublicsetConfig( \Zend_Config $config ) : \Zend_Form

Set form state from config object

Inherited from: \Zend_Form::setConfig()
Parameters
Name Type Description
$config \Zend_Config
Returns
Type Description
\Zend_Form
methodpublicsetDecorators( array $decorators ) : \Zend_Form

Overwrite all decorators

Inherited from: \Zend_Form::setDecorators()
Parameters
Name Type Description
$decorators array
Returns
Type Description
\Zend_Form
methodpublicsetDefault( string $name, mixed $value ) : \Zend_Form

Set default value for an element

Inherited from: \Zend_Form::setDefault()
Parameters
Name Type Description
$name string
$value mixed
Returns
Type Description
\Zend_Form
methodpublicsetDefaultDisplayGroupClass( string $class ) : \Zend_Form

Set default display group class

Inherited from: \Zend_Form::setDefaultDisplayGroupClass()
Parameters
Name Type Description
$class string
Returns
Type Description
\Zend_Form
methodpublicsetDefaultTranslator( \Zend_Translate|\Zend_Translate_Adapter|null $translator = null ) : void
static

Set global default translator object

Inherited from: \Zend_Form::setDefaultTranslator()
Parameters
Name Type Description
$translator \Zend_Translate|\Zend_Translate_Adapter|null
methodpublicsetDefaults( array $defaults ) : \Zend_Form

Set default values for elements

Inherited from: \Zend_Form::setDefaults()

Sets values for all elements specified in the array of $defaults.

Parameters
Name Type Description
$defaults array
Returns
Type Description
\Zend_Form
methodpublicsetDescription( string $value ) : \Zend_Form

Set form description

Inherited from: \Zend_Form::setDescription()
Parameters
Name Type Description
$value string
Returns
Type Description
\Zend_Form
methodpublicsetDisableLoadDefaultDecorators( bool $flag ) : \Zend_Form

Set flag to disable loading default decorators

Inherited from: \Zend_Form::setDisableLoadDefaultDecorators()
Parameters
Name Type Description
$flag bool
Returns
Type Description
\Zend_Form
methodpublicsetDisableTranslator( bool $flag ) : \Zend_Form

Indicate whether or not translation should be disabled

Inherited from: \Zend_Form::setDisableTranslator()
Parameters
Name Type Description
$flag bool
Returns
Type Description
\Zend_Form
methodpublicsetDisplayGroupDecorators( array $decorators ) : \Zend_Form

Set all display group decorators as specified

Inherited from: \Zend_Form::setDisplayGroupDecorators()
Parameters
Name Type Description
$decorators array
Returns
Type Description
\Zend_Form
methodpublicsetDisplayGroups( array $groups ) : \Zend_Form

Add multiple display groups (overwrites)

Inherited from: \Zend_Form::setDisplayGroups()
Parameters
Name Type Description
$groups array
Returns
Type Description
\Zend_Form
methodpublicsetElementDecorators( array $decorators, array|null $elements = null, bool $include = true ) : \Zend_Form

Set all element decorators as specified

Inherited from: \Zend_Form::setElementDecorators()
Parameters
Name Type Description
$decorators array
$elements array|null Specific elements to decorate or exclude from decoration
$include bool

Whether $elements is an inclusion or exclusion list

Returns
Type Description
\Zend_Form
methodpublicsetElementFilters( array $filters ) : \Zend_Form

Set all elements' filters

Inherited from: \Zend_Form::setElementFilters()
Parameters
Name Type Description
$filters array
Returns
Type Description
\Zend_Form
methodpublicsetElements( array $elements ) : \Zend_Form

Set form elements (overwrites existing elements)

Inherited from: \Zend_Form::setElements()
Parameters
Name Type Description
$elements array
Returns
Type Description
\Zend_Form
methodpublicsetElementsBelongTo( string $array ) : \Zend_Form

Set name of array elements belong to

Inherited from: \Zend_Form::setElementsBelongTo()
Parameters
Name Type Description
$array string
Returns
Type Description
\Zend_Form
methodpublicsetEnctype( string $value ) : \Zend_Form

Set encoding type

Inherited from: \Zend_Form::setEnctype()
Parameters
Name Type Description
$value string
Returns
Type Description
\Zend_Form
methodpublicsetErrorMessages( array $messages ) : \Zend_Form

Same as addErrorMessages(), but clears custom error message stack first

Inherited from: \Zend_Form::setErrorMessages()
Parameters
Name Type Description
$messages array
Returns
Type Description
\Zend_Form
methodpublicsetErrors( array $messages ) : \Zend_Form

Overwrite any previously set error messages and flag as failed validation

Inherited from: \Zend_Form::setErrors()
Parameters
Name Type Description
$messages array
Returns
Type Description
\Zend_Form
methodpublicsetIsArray( bool $flag ) : \Zend_Form

Set flag indicating elements belong to array

Inherited from: \Zend_Form::setIsArray()
Parameters
Name Type Description
$flag bool Value of flag
Returns
Type Description
\Zend_Form
methodpublicsetLegend( string $value ) : \Zend_Form

Set form legend

Inherited from: \Zend_Form::setLegend()
Parameters
Name Type Description
$value string
Returns
Type Description
\Zend_Form
methodpublicsetMethod( string $method ) : \Zend_Form

Set form method

Inherited from: \Zend_Form::setMethod()

Only values in {@link $_methods()} allowed

Parameters
Name Type Description
$method string
Returns
Type Description
\Zend_Form
Throws
Exception Description
\Zend_Form_Exception
methodpublicsetName( string $name ) : \Zend_Form

Set form name

Inherited from: \Zend_Form::setName()
Parameters
Name Type Description
$name string
Returns
Type Description
\Zend_Form
methodpublicsetOptions( array $options ) : \Zend_Form

Set form state from options array

Inherited from: \Zend_Form::setOptions()
Parameters
Name Type Description
$options array
Returns
Type Description
\Zend_Form
methodpublicsetOrder( int $index ) : \Zend_Form

Set form order

Inherited from: \Zend_Form::setOrder()
Parameters
Name Type Description
$index int
Returns
Type Description
\Zend_Form
methodpublicsetPluginLoader( \Zend_Loader_PluginLoader_Interface $loader, string $type = null ) : \Zend_Form

Set plugin loaders for use with decorators and elements

Inherited from: \Zend_Form::setPluginLoader()
Parameters
Name Type Description
$loader \Zend_Loader_PluginLoader_Interface
$type string

'decorator' or 'element'

Returns
Type Description
\Zend_Form
Throws
Exception Description
\Zend_Form_Exception on invalid type
methodpublicsetSubFormDecorators( array $decorators ) : \Zend_Form

Set all subform decorators as specified

Inherited from: \Zend_Form::setSubFormDecorators()
Parameters
Name Type Description
$decorators array
Returns
Type Description
\Zend_Form
methodpublicsetSubForms( array $subForms ) : \Zend_Form

Set multiple form subForms/subforms (overwrites)

Inherited from: \Zend_Form::setSubForms()
Parameters
Name Type Description
$subForms array
Returns
Type Description
\Zend_Form
methodpublicsetTranslator( \Zend_Translate|\Zend_Translate_Adapter|null $translator = null ) : \Zend_Form

Set translator object

Inherited from: \Zend_Form::setTranslator()
Parameters
Name Type Description
$translator \Zend_Translate|\Zend_Translate_Adapter|null
Returns
Type Description
\Zend_Form
methodpublicsetView( \Zend_View_Interface $view = null ) : \Zend_Form

Set view object

Inherited from: \Zend_Form::setView()
Parameters
Name Type Description
$view \Zend_View_Interface
Returns
Type Description
\Zend_Form
methodpublictranslatorIsDisabled( ) : bool

Is translation disabled?

Inherited from: \Zend_Form::translatorIsDisabled()
Returns
Type Description
bool
methodpublicvalid( ) : bool

Determine if current element/subform/display group is valid

Inherited from: \Zend_Form::valid()
Returns
Type Description
bool
Documentation was generated by DocBlox 0.13.3.