Dojo/Form.php

Show: inherited
Table of Contents

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 [email protected] so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Dojo  
Subpackage
Form  

\Zend_Dojo_Form

Package: Zend\Dojo\Form

Dijit-enabled Form

Parent(s)
\Zend_Form
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Uses
\global\Zend_Form  
Version
$Id: Form.php 24593 2012-01-05 20:35:02Z matthew $  

Constants

Constant  DECORATOR = 'DECORATOR'
inheritedInherited from: \Zend_Form::DECORATOR
Inherited_from
\Zend_Form::DECORATOR  
Constant  ELEMENT = 'ELEMENT'
inheritedInherited from: \Zend_Form::ELEMENT
Inherited_from
\Zend_Form::ELEMENT  
Constant  METHOD_DELETE = 'delete'
inheritedInherited from: \Zend_Form::METHOD_DELETE
Inherited_from
\Zend_Form::METHOD_DELETE  
Constant  METHOD_GET = 'get'
inheritedInherited from: \Zend_Form::METHOD_GET
Inherited_from
\Zend_Form::METHOD_GET  
Constant  METHOD_POST = 'post'
inheritedInherited from: \Zend_Form::METHOD_POST
Inherited_from
\Zend_Form::METHOD_POST  
Constant  METHOD_PUT = 'put'
inheritedInherited from: \Zend_Form::METHOD_PUT
Inherited_from
\Zend_Form::METHOD_PUT  
Constant  ENCTYPE_URLENCODED = 'application/x-www-form-urlencoded'
inheritedInherited from: \Zend_Form::ENCTYPE_URLENCODED
Inherited_from
\Zend_Form::ENCTYPE_URLENCODED  
Constant  ENCTYPE_MULTIPART = 'multipart/form-data'
inheritedInherited from: \Zend_Form::ENCTYPE_MULTIPART
Inherited_from
\Zend_Form::ENCTYPE_MULTIPART  

Properties

Propertyprotectedarray $_attribs = array()
inherited

Form metadata and attributes

Inherited from: \Zend_Form::$$_attribs
Default valuearray()Details
Type
array
Inherited_from
\Zend_Form::$$_attribs  
Propertyprotectedarray $_decorators = array()
inherited

Decorators for rendering

Inherited from: \Zend_Form::$$_decorators
Default valuearray()Details
Type
array
Inherited_from
\Zend_Form::$$_decorators  
Propertyprotectedstring $_defaultDisplayGroupClass = 'Zend_Form_DisplayGroup'
inherited

Default display group class

Inherited from: \Zend_Form::$$_defaultDisplayGroupClass
Default value'Zend_Form_DisplayGroup'Details
Type
string
Inherited_from
\Zend_Form::$$_defaultDisplayGroupClass  
Propertyprotectedstring $_description =
inherited

Form description

Inherited from: \Zend_Form::$$_description
Details
Type
string
Inherited_from
\Zend_Form::$$_description  
Propertyprotectedbool $_disableLoadDefaultDecorators = false
inherited

Should we disable loading the default decorators?

Inherited from: \Zend_Form::$$_disableLoadDefaultDecorators
Default valuefalseDetails
Type
bool
Inherited_from
\Zend_Form::$$_disableLoadDefaultDecorators  
Propertyprotectedarray $_displayGroupPrefixPaths = array()
inherited

Display group prefix paths

Inherited from: \Zend_Form::$$_displayGroupPrefixPaths
Default valuearray()Details
Type
array
Inherited_from
\Zend_Form::$$_displayGroupPrefixPaths  
Propertyprotectedarray $_displayGroups = array()
inherited

Groups of elements grouped for display purposes

Inherited from: \Zend_Form::$$_displayGroups
Default valuearray()Details
Type
array
Inherited_from
\Zend_Form::$$_displayGroups  
Propertyprotectednull|array $_elementDecorators =
inherited

Global decorators to apply to all elements

Inherited from: \Zend_Form::$$_elementDecorators
Details
Type
null | array
Inherited_from
\Zend_Form::$$_elementDecorators  
Propertyprotectedarray $_elementPrefixPaths = array()
inherited

Prefix paths to use when creating elements

Inherited from: \Zend_Form::$$_elementPrefixPaths
Default valuearray()Details
Type
array
Inherited_from
\Zend_Form::$$_elementPrefixPaths  
Propertyprotectedarray $_elements = array()
inherited

Form elements

Inherited from: \Zend_Form::$$_elements
Default valuearray()Details
Type
array
Inherited_from
\Zend_Form::$$_elements  
Propertyprotectedstring $_elementsBelongTo =
inherited

Array to which elements belong (if any)

Inherited from: \Zend_Form::$$_elementsBelongTo
Details
Type
string
Inherited_from
\Zend_Form::$$_elementsBelongTo  
Propertyprotectedarray $_errorMessages = array()
inherited

Custom form-level error messages

Inherited from: \Zend_Form::$$_errorMessages
Default valuearray()Details
Type
array
Inherited_from
\Zend_Form::$$_errorMessages  
Propertyprotectedbool $_errorsExist = false
inherited

Are there errors in the form?

Inherited from: \Zend_Form::$$_errorsExist
Default valuefalseDetails
Type
bool
Inherited_from
\Zend_Form::$$_errorsExist  
Propertyprotectedbool $_errorsForced = false
inherited

Has the form been manually flagged as an error?

Inherited from: \Zend_Form::$$_errorsForced
Default valuefalseDetails
Type
bool
Inherited_from
\Zend_Form::$$_errorsForced  
Propertyprotectedint|null $_formOrder =
inherited

Form order

Inherited from: \Zend_Form::$$_formOrder
Details
Type
int | null
Inherited_from
\Zend_Form::$$_formOrder  
Propertyprotectedbool $_isArray = false
inherited

Whether or not form elements are members of an array

Inherited from: \Zend_Form::$$_isArray
Default valuefalseDetails
Type
bool
Inherited_from
\Zend_Form::$$_isArray  
Propertyprotectedbool $_isRendered = false
inherited

Inherited from: \Zend_Form::$$_isRendered
Default valuefalseDetails
Type
bool
Inherited_from
\Zend_Form::$$_isRendered  
Propertyprotectedstring $_legend =
inherited

Form legend

Inherited from: \Zend_Form::$$_legend
Details
Type
string
Inherited_from
\Zend_Form::$$_legend  
Propertyprotectedarray $_loaders = array()
inherited

Plugin loaders

Inherited from: \Zend_Form::$$_loaders
Default valuearray()Details
Type
array
Inherited_from
\Zend_Form::$$_loaders  
Propertyprotectedarray $_methods = array('delete', 'get', 'post', 'put')
inherited

Allowed form methods

Inherited from: \Zend_Form::$$_methods
Default valuearray('delete', 'get', 'post', 'put')Details
Type
array
Inherited_from
\Zend_Form::$$_methods  
Propertyprotectedarray $_order = array()
inherited

Order in which to display and iterate elements

Inherited from: \Zend_Form::$$_order
Default valuearray()Details
Type
array
Inherited_from
\Zend_Form::$$_order  
Propertyprotectedbool $_orderUpdated = false
inherited

Whether internal order has been updated or not

Inherited from: \Zend_Form::$$_orderUpdated
Default valuefalseDetails
Type
bool
Inherited_from
\Zend_Form::$$_orderUpdated  
Propertyprotectedarray $_subFormPrefixPaths = array()
inherited

Sub form prefix paths

Inherited from: \Zend_Form::$$_subFormPrefixPaths
Default valuearray()Details
Type
array
Inherited_from
\Zend_Form::$$_subFormPrefixPaths  
Propertyprotectedarray $_subForms = array()
inherited

Sub forms

Inherited from: \Zend_Form::$$_subForms
Default valuearray()Details
Type
array
Inherited_from
\Zend_Form::$$_subForms  
Propertyprotected\Zend_Translate $_translator =
inherited

Inherited from: \Zend_Form::$$_translator
Details
Type
\Zend_Translate
Inherited_from
\Zend_Form::$$_translator  
Propertyprotected\Zend_Translate $_translatorDefault =
staticinherited

Global default translation adapter

Inherited from: \Zend_Form::$$_translatorDefault
Details
Type
\Zend_Translate
Inherited_from
\Zend_Form::$$_translatorDefault  
Propertyprotectedbool $_translatorDisabled = false
inherited

is the translator disabled?

Inherited from: \Zend_Form::$$_translatorDisabled
Default valuefalseDetails
Type
bool
Inherited_from
\Zend_Form::$$_translatorDisabled  
Propertyprotected\Zend_View_Interface $_view =
inherited

Inherited from: \Zend_Form::$$_view
Details
Type
\Zend_View_Interface
Inherited_from
\Zend_Form::$$_view  

Methods

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

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
inherited

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
inherited

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_Form | null
methodpublic__isset(string $name) : boolean
inherited

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
inherited

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
inherited

Serialize as string

Inherited from: \Zend_Form::__toString()

Proxies to render().

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

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

Retrieve optionally translated custom error messages

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

Get the value of $_isRendered member

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

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
inherited

Set array to which elements belong

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

Element name

methodprotected_setIsRendered() : void
inherited

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
inherited

Sort items according to their order

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

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

Clear all form attributes

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

Clear all decorators

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

Remove all display groups

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

Remove all form elements

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

Clear custom error messages stack

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

Remove all form subForms/subforms

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

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
inherited

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
inherited

Current element/subform/display group

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

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
inherited

Get form action

Inherited from: \Zend_Form::getAction()

Sets default to '' if not set.

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

Retrieve a single form attribute

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

Retrieve all form attributes/metadata

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

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
inherited

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
inherited

Retrieve all decorators

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

Retrieve default display group class

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

Get global default translator object

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

Retrieve form description

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

Return a display group

Inherited from: \Zend_Form::getDisplayGroup()
Parameters
Name Type Description
$name string
Returns
Type Description
\Zend_Form_DisplayGroup | null
methodpublicgetDisplayGroups() : array
inherited

Return all display groups

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

Retrieve a single element

Inherited from: \Zend_Form::getElement()
Parameters
Name Type Description
$name string
Returns
Type Description
\Zend_Form_Element | null
methodpublicgetElements() : array
inherited

Retrieve all elements

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

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
inherited

Get name of array elements belong to

Inherited from: \Zend_Form::getElementsBelongTo()
Returns
Type Description
string | null
methodpublicgetEnctype() : string
inherited

Get encoding type

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

Retrieve custom error messages

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

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
inherited

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
inherited

Get element id

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

Get form legend

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

Retrieve error messages from elements failing validations

Inherited from: \Zend_Form::getMessages()

The array keys are validation failure message identifiers, and the array values are the corresponding human-readable message strings.

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
inherited

Retrieve form method

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

Get name attribute

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

Get form order

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

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
inherited

Retrieve a form subForm/subform

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

Retrieve all form subForms/subforms

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

Retrieve translator object

Inherited from: \Zend_Form::getTranslator()
Returns
Type Description
\Zend_Translate | null
methodpublicgetUnfilteredValue(string $name) : mixed
inherited

Get unfiltered element value

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

Retrieve all unfiltered element values

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

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
inherited

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
inherited

Retrieve all form element values

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

Retrieve view object

Inherited from: \Zend_Form::getView()

If none registered, attempts to pull from ViewRenderer.

Returns
Type Description
\Zend_View_Interface | null
methodpublichasDefaultTranslator() : boolean
staticinherited

Is there a default translation object set?

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

Are there errors in the form?

Inherited from: \Zend_Form::hasErrors()
Returns
Type Description
bool
methodpublichasTranslator() : bool
inherited

Does this form have its own specific translator?

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

Initialize form (used by extending classes)

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

Get flag indicating if elements belong to an array

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

Are there errors in the form?

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

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
inherited

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
inherited

Current element/subform/display group name

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

Load the default decorators

methodpublicloadDefaultDecoratorsIsDisabled() : bool
inherited

Should we load the default decorators?

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

Mark the element as being in a failed validation state

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

Move pointer to next element/subform/display group

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

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

Populate form

Inherited from: \Zend_Form::populate()

Proxies to setDefaults()

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

Process submitted AJAX data

Inherited from: \Zend_Form::processAjax()

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

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

Remove attribute

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

Remove a single decorator

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

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
inherited

Remove element

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

Remove an element from iteration

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

Element/group/form name

methodpublicremoveSubForm(string $name) : boolean
inherited

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
inherited

Render form

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

Reset values of form

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

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

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

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
staticinherited

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
inherited

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
inherited

Set form description

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

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

Set encoding type

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

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
inherited

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
inherited

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
inherited

Set form legend

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

Set form method

Inherited from: \Zend_Form::setMethod()

Only values in $_methods() allowed

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

Set form name

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

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
inherited

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
inherited

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
inherited

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
inherited

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
inherited

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_Dojo_Form_Element_Dijit

Set the view object

Ensures that the view object has the dojo view helper path set.

Parameters
Name Type Description
$view \Zend_View_Interface
Returns
Type Description
\Zend_Dojo_Form_Element_Dijit
methodpublictranslatorIsDisabled() : bool
inherited

Is translation disabled?

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

Determine if current element/subform/display group is valid

Inherited from: \Zend_Form::valid()
Returns
Type Description
bool
Documentation was generated by phpDocumentor 2.0.0a8.