Class Zend_Form

Description

Implements interfaces:

Zend_Form

  • version: $Id: Form.php 22465 2010-06-19 17:41:03Z alab $
  • copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  • usedby: Zend_Dojo_Form
  • license: New BSD License

Located in /Form.php (line 33)


	
			
Direct descendents
Class Description
 class Zend_Dojo_Form Dijit-enabled Form
 class Zend_Form_SubForm Zend_Form_SubForm
Class Constant Summary
 DECORATOR = 'DECORATOR'
 ELEMENT = 'ELEMENT'
 ENCTYPE_MULTIPART = 'multipart/form-data'
 ENCTYPE_URLENCODED = 'application/x-www-form-urlencoded'
 METHOD_DELETE = 'delete'
 METHOD_GET = 'get'
 METHOD_POST = 'post'
 METHOD_PUT = 'put'
Variable Summary
Method Summary
 static boolean hasDefaultTranslator ()
 static void setDefaultTranslator ([Zend_Translate|Zend_Translate_Adapter|null $translator = null])
 void __construct ([mixed $options = null])
 Zend_Form addAttribs ( $attribs)
 Zend_Form addDecorator (string|Zend_Form_Decorator_Interface $decorator, [array|Zend_Config $options = null])
 Zend_Form addDecorators ( $decorators)
 Zend_Form addDisplayGroup ( $elements, string $name, [array|Zend_Config $options = null])
 Zend_Form addDisplayGroupPrefixPath (string $prefix, string $path)
 Zend_Form addElement (string|Zend_Form_Element $element, [string $name = null], [array|Zend_Config $options = null])
 Zend_Form addElementPrefixPath (string $prefix, string $path, [string $type = null])
 Zend_Form addElements ( $elements)
 Zend_Form addError (string $message)
 Zend_Form addErrorMessage (string $message)
 Zend_Form addErrorMessages ( $messages)
 Zend_Form addErrors ( $messages)
 Zend_Form addPrefixPath (string $prefix, string $path, [string $type = null])
 Zend_Form addSubForm (Zend_Form $form, string $name, [int $order = null])
 Zend_Form addSubForms ( $subForms)
 int count ()
 Zend_Form_Element createElement (string $type, string $name, [array|Zend_Config $options = null])
 string filterName (string $value, [bool $allowBrackets = false])
 string getAction ()
 mixed getAttrib (string $key)
 array getAttribs ()
 array getDecorators ()
 string getDescription ()
 array getDisplayGroups ()
 Zend_Form_Element|null getElement (string $name)
 array getElements ()
 string|null getElementsBelongTo ()
 string getEnctype ()
 array getErrorMessages ()
 array getErrors ([string $name = null], [ $suppressArrayNotation = false])
 string getId ()
 string getLegend ()
 array getMessages ([string $name = null], [bool $suppressArrayNotation = false])
 string getMethod ()
 null|string getName ()
 int|null getOrder ()
 Zend_Form|null getSubForm (string $name)
 array getSubForms ()
 mixed getUnfilteredValue (string $name)
 array getValidValues (array $data, [bool $suppressArrayNotation = false])
 mixed getValue (string $name)
 array getValues ([bool $suppressArrayNotation = false])
 bool hasTranslator ()
 void init ()
 bool isArray ()
 bool isErrors ()
 boolean isValid (array $data)
 boolean isValidPartial ( $data)
 string key ()
 void next ()
 void persistData ()
 Zend_Form populate ( $values)
 string processAjax ( $data)
 bool removeAttrib (string $key)
 bool removeDecorator (string $name)
 boolean removeDisplayGroup (string $name)
 boolean removeElement (string $name)
 boolean removeSubForm (string $name)
 string render ([ $view = null])
 void rewind ()
 Zend_Form setAction (string $action)
 Zend_Form setAttrib (string $key, mixed $value)
 Zend_Form setAttribs ( $attribs)
 Zend_Form setConfig ( $config)
 Zend_Form setDecorators ( $decorators)
 Zend_Form setDefault (string $name, mixed $value)
 Zend_Form setDefaults ( $defaults)
 Zend_Form setDescription (string $value)
 Zend_Form setElementDecorators ( $decorators, [ $elements = null], [bool $include = true])
 Zend_Form setElements ( $elements)
 Zend_Form setElementsBelongTo (string $array)
 Zend_Form setEnctype (string $value)
 Zend_Form setErrorMessages ( $messages)
 Zend_Form setErrors ( $messages)
 Zend_Form setIsArray (bool $flag)
 Zend_Form setLegend (string $value)
 Zend_Form setMethod (string $method)
 Zend_Form setName (string $name)
 Zend_Form setOptions ( $options)
 Zend_Form setOrder (int $index)
 Zend_Form setPluginLoader ( $loader, [string $type = null])
 Zend_Form setSubForms ( $subForms)
 Zend_Form setView ([ $view = null])
 bool valid ()
 Zend_Form _addDisplayGroupObject (Zend_Form_DisplayGroup $group, [string|null $name = null])
 void _array_replace_recursive ( $into)
 array _attachToArray (mixed $value, string $arrayPath)
 array _dissolveArrayUnsetKey (array $array, string|null $arrayPath, string $key)
 string _dissolveArrayValue (array $value, string $arrayPath)
 string _getArrayName (string $value)
 Zend_Form_Decorator_Interface _getDecorator (string $name, null|array $options)
 void _getIsRendered ()
 Zend_Form_Decorator_Interface _loadDecorator ( $decorator, mixed $name)
 void _setElementsBelongTo ([string $name = null])
 void _setIsRendered ()
 void _sort ()
 string __call (string $method, array $args)
 void __clone ()
 Zend_Form_Element|Zend_Form|null __get (string $name)
 boolean __isset (string $name)
 void __set (string $name, Zend_Form_Element|Zend_Form $value)
 string __toString ()
 void __unset (string $name)
Variables
static Zend_Translate $_translatorDefault (line 205)

Global default translation adapter

  • access: protected
array $_attribs = array() (line 62)

Form metadata and attributes

  • access: protected
array $_decorators = array() (line 68)

Decorators for rendering

  • access: protected
string $_defaultDisplayGroupClass = 'Zend_Form_DisplayGroup' (line 74)

Default display group class

  • access: protected
string $_description (line 80)

Form description

  • access: protected
bool $_disableLoadDefaultDecorators = false (line 86)

Should we disable loading the default decorators?

  • access: protected
array $_displayGroupPrefixPaths = array() (line 92)

Display group prefix paths

  • access: protected
array $_displayGroups = array() (line 98)

Groups of elements grouped for display purposes

  • access: protected
null|array $_elementDecorators (line 104)

Global decorators to apply to all elements

  • access: protected
array $_elementPrefixPaths = array() (line 110)

Prefix paths to use when creating elements

  • access: protected
array $_elements = array() (line 116)

Form elements

  • access: protected
string $_elementsBelongTo (line 122)

Array to which elements belong (if any)

  • access: protected
array $_errorMessages = array() (line 128)

Custom form-level error messages

  • access: protected
bool $_errorsExist = false (line 134)

Are there errors in the form?

  • access: protected
bool $_errorsForced = false (line 140)

Has the form been manually flagged as an error?

  • access: protected
int|null $_formOrder (line 146)

Form order

  • access: protected
bool $_isArray = false (line 152)

Whether or not form elements are members of an array

  • access: protected

Redefined in descendants as:
bool $_isRendered = false (line 221)
  • access: protected
string $_legend (line 158)

Form legend

  • access: protected
array $_loaders = array() (line 164)

Plugin loaders

  • access: protected
array $_methods = array('delete', 'get', 'post', 'put') (line 170)

Allowed form methods

  • access: protected
array $_order = array() (line 176)

Order in which to display and iterate elements

  • access: protected
bool $_orderUpdated = false (line 182)

Whether internal order has been updated or not

  • access: protected
array $_subFormPrefixPaths = array() (line 188)

Sub form prefix paths

  • access: protected
array $_subForms = array() (line 194)

Sub forms

  • access: protected
Zend_Translate $_translator (line 199)
  • access: protected
bool $_translatorDisabled = false (line 211)

is the translator disabled?

  • access: protected
Zend_View_Interface $_view (line 216)
  • access: protected
Methods
static getDefaultTranslator (line 2991)

Get global default translator object

  • access: public
static null|Zend_Translate getDefaultTranslator ()
static hasDefaultTranslator (line 3012)

Is there a default translation object set?

  • access: public
static boolean hasDefaultTranslator ()
static setDefaultTranslator (line 2944)

Set global default translator object

  • access: public
static void setDefaultTranslator ([Zend_Translate|Zend_Translate_Adapter|null $translator = null])
Constructor __construct (line 231)

Constructor

Registers form view helper as decorator

  • access: public
void __construct ([mixed $options = null])
  • mixed $options

Redefined in descendants as:
addAttribs (line 665)

Add multiple form attributes at once

  • access: public
Zend_Form addAttribs ( $attribs)
  • array $attribs
addDecorator (line 2625)

Add a decorator for rendering the element

  • access: public
Zend_Form addDecorator (string|Zend_Form_Decorator_Interface $decorator, [array|Zend_Config $options = null])
addDecorators (line 2667)

Add many decorators at once

  • access: public
Zend_Form addDecorators ( $decorators)
  • array $decorators
addDisplayGroup (line 1781)

Add a display group

Groups named elements for display purposes.

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

  • throws: Zend_Form_Exception if no valid elements provided
  • access: public
Zend_Form addDisplayGroup ( $elements, string $name, [array|Zend_Config $options = null])
  • array $elements
  • string $name
  • array|Zend_Config $options
addDisplayGroupPrefixPath (line 592)

Add prefix path for all display groups

  • access: public
Zend_Form addDisplayGroupPrefixPath (string $prefix, string $path)
  • string $prefix
  • string $path
addDisplayGroupPrefixPaths (line 612)

Add multiple display group prefix paths at once

  • access: public
Zend_Form addDisplayGroupPrefixPaths ( $spec)
  • array $spec
addDisplayGroups (line 1869)

Add multiple display groups at once

  • access: public
Zend_Form addDisplayGroups ( $groups)
  • array $groups
addElement (line 1015)

Add a new element

$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.

  • access: public
Zend_Form addElement (string|Zend_Form_Element $element, [string $name = null], [array|Zend_Config $options = null])
addElementPrefixPath (line 549)

Add prefix path for all elements

  • access: public
Zend_Form addElementPrefixPath (string $prefix, string $path, [string $type = null])
  • string $prefix
  • string $path
  • string $type
addElementPrefixPaths (line 574)

Add prefix paths for all elements

  • access: public
Zend_Form addElementPrefixPaths ( $spec)
  • array $spec
addElements (line 1116)

Add multiple elements at once

  • access: public
Zend_Form addElements ( $elements)
  • array $elements
addError (line 2406)

Add an error message and mark element as failed validation

  • access: public
Zend_Form addError (string $message)
  • string $message
addErrorMessage (line 2335)

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

  • access: public
Zend_Form addErrorMessage (string $message)
  • string $message
addErrorMessages (line 2347)

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

  • access: public
Zend_Form addErrorMessages ( $messages)
  • array $messages
addErrors (line 2419)

Add multiple error messages and flag element as failed validation

  • access: public
Zend_Form addErrors ( $messages)
  • array $messages
addPrefixPath (line 485)

Add prefix path for plugin loader

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/'

  • throws: Zend_Form_Exception for invalid type
  • access: public
Zend_Form addPrefixPath (string $prefix, string $path, [string $type = null])
  • string $prefix
  • string $path
  • string $type
addPrefixPaths (line 517)

Add many prefix paths at once

  • access: public
Zend_Form addPrefixPaths ( $spec)
  • array $spec
addSubForm (line 1586)

Add a form group/subform

  • access: public
Zend_Form addSubForm (Zend_Form $form, string $name, [int $order = null])
addSubForms (line 1635)

Add multiple form subForms/subforms at once

  • access: public
Zend_Form addSubForms ( $subForms)
  • array $subForms
clearAttribs (line 734)

Clear all form attributes

  • access: public
Zend_Form clearAttribs ()
clearDecorators (line 2797)

Clear all decorators

  • access: public
Zend_Form clearDecorators ()
clearDisplayGroups (line 1994)

Remove all display groups

  • access: public
Zend_Form clearDisplayGroups ()
clearElements (line 1234)

Remove all form elements

  • access: public
Zend_Form clearElements ()
clearErrorMessages (line 2382)

Clear custom error messages stack

  • access: public
Zend_Form clearErrorMessages ()
clearSubForms (line 1731)

Remove all form subForms/subforms

  • access: public
Zend_Form clearSubForms ()
count (line 3232)

Count of elements/subforms that are iterable

  • access: public
int count ()

Implementation of:
Countable::count
createElement (line 1072)

Create an element

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.).

  • access: public
Zend_Form_Element createElement (string $type, string $name, [array|Zend_Config $options = null])
current (line 3165)

Current element/subform/display group

  • access: public

Implementation of:
Iterator::current
filterName (line 835)

Filter a name to only allow valid variable characters

  • access: public
string filterName (string $value, [bool $allowBrackets = false])
  • string $value
  • bool $allowBrackets
getAction (line 758)

Get form action

Sets default to '' if not set.

  • access: public
string getAction ()
getAttrib (line 693)

Retrieve a single form attribute

  • access: public
mixed getAttrib (string $key)
  • string $key
getAttribs (line 708)

Retrieve all form attributes/metadata

  • access: public
array getAttribs ()
getCustomMessages (line 2561)

Retrieve translated custom error messages Proxies to _getErrorMessages().

  • access: public
array getCustomMessages ()
getDecorator (line 2726)

Retrieve a registered decorator

  • access: public
false|Zend_Form_Decorator_Abstract getDecorator (string $name)
  • string $name
getDecorators (line 2757)

Retrieve all decorators

  • access: public
array getDecorators ()
getDefaultDisplayGroupClass (line 1763)

Retrieve default display group class

  • access: public
string getDefaultDisplayGroupClass ()
getDescription (line 951)

Retrieve form description

  • access: public
string getDescription ()
getDisplayGroup (line 1941)

Return a display group

  • access: public
Zend_Form_DisplayGroup|null getDisplayGroup (string $name)
  • string $name
getDisplayGroups (line 1956)

Return all display groups

  • access: public
array getDisplayGroups ()
getElement (line 1184)

Retrieve a single element

  • access: public
Zend_Form_Element|null getElement (string $name)
  • string $name
getElements (line 1197)

Retrieve all elements

  • access: public
array getElements ()
getElementsAndSubFormsOrdered (line 2154)

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

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

  • access: public
array getElementsAndSubFormsOrdered ()
getElementsBelongTo (line 1543)

Get name of array elements belong to

  • access: public
string|null getElementsBelongTo ()
getEnctype (line 819)

Get encoding type

  • access: public
string getEnctype ()
getErrorMessages (line 2372)

Retrieve custom error messages

  • access: public
array getErrorMessages ()
getErrors (line 2460)

Get error codes for all elements failing validation

  • access: public
array getErrors ([string $name = null], [ $suppressArrayNotation = false])
  • string $name
  • $suppressArrayNotation
getFullyQualifiedName (line 878)

Get fully qualified name

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

  • access: public
string getFullyQualifiedName ()
getId (line 888)

Get element id

  • access: public
string getId ()
getLegend (line 929)

Get form legend

  • access: public
string getLegend ()
getMessages (line 2501)

Retrieve error messages from elements failing validations

  • access: public
array getMessages ([string $name = null], [bool $suppressArrayNotation = false])
  • string $name
  • bool $suppressArrayNotation
getMethod (line 793)

Retrieve form method

  • access: public
string getMethod ()
getName (line 866)

Get name attribute

  • access: public
null|string getName ()
getOrder (line 973)

Get form order

  • access: public
int|null getOrder ()
getPluginLoader (line 435)

Retrieve plugin loader for given type

$type may be one of:

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

  • access: public
Zend_Loader_PluginLoader_Interface getPluginLoader ([string $type = null])
  • string $type
getSubForm (line 1686)

Retrieve a form subForm/subform

  • access: public
Zend_Form|null getSubForm (string $name)
  • string $name
getSubForms (line 1700)

Retrieve all form subForms/subforms

  • access: public
array getSubForms ()
getTranslator (line 2963)

Retrieve translator object

  • access: public
Zend_Translate|null getTranslator ()
getUnfilteredValue (line 1448)

Get unfiltered element value

  • access: public
mixed getUnfilteredValue (string $name)
  • string $name
getUnfilteredValues (line 1461)

Retrieve all unfiltered element values

  • access: public
array getUnfilteredValues ()
getValidValues (line 1388)

Returns only the valid values from the given form input.

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.

  • access: public
array getValidValues (array $data, [bool $suppressArrayNotation = false])
  • array $data
  • bool $suppressArrayNotation
getValue (line 1312)

Retrieve value for single element

  • access: public
mixed getValue (string $name)
  • string $name
getValues (line 1336)

Retrieve all form element values

  • access: public
array getValues ([bool $suppressArrayNotation = false])
  • bool $suppressArrayNotation
getView (line 2588)

Retrieve view object

If none registered, attempts to pull from ViewRenderer.

  • access: public
Zend_View_Interface|null getView ()

Redefined in descendants as:
hasTranslator (line 2981)

Does this form have its own specific translator?

  • access: public
bool hasTranslator ()
init (line 299)

Initialize form (used by extending classes)

  • access: public
void init ()
isArray (line 1571)

Get flag indicating if elements belong to an array

  • access: public
bool isArray ()
isErrors (line 2449)

Are there errors in the form?

  • access: public
bool isErrors ()
isValid (line 2209)

Validate the form

  • access: public
boolean isValid (array $data)
  • array $data
isValidPartial (line 2268)

Validate a partial form

Does not check for required flags.

  • access: public
boolean isValidPartial ( $data)
  • array $data
key (line 3188)

Current element/subform/display group name

  • access: public
string key ()

Implementation of:
Iterator::key
loadDefaultDecorators (line 3264)

Load the default decorators

  • access: public
void loadDefaultDecorators ()

Redefined in descendants as:
loadDefaultDecoratorsIsDisabled (line 3254)

Should we load the default decorators?

  • access: public
bool loadDefaultDecoratorsIsDisabled ()
markAsError (line 2393)

Mark the element as being in a failed validation state

  • access: public
Zend_Form markAsError ()
next (line 3199)

Move pointer to next element/subform/display group

  • access: public
void next ()

Implementation of:
Iterator::next
persistData (line 2440)
  • access: public
void persistData ()
populate (line 2023)

Populate form

Proxies to setDefaults()

  • access: public
Zend_Form populate ( $values)
  • array $values
processAjax (line 2319)

Process submitted AJAX data

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()).

  • return: JSON-encoded boolean true or error messages
  • access: public
string processAjax ( $data)
  • array $data
removeAttrib (line 719)

Remove attribute

  • access: public
bool removeAttrib (string $key)
  • string $key
removeDecorator (line 2773)

Remove a single decorator

  • access: public
bool removeDecorator (string $name)
  • string $name
removeDisplayGroup (line 1967)

Remove a display group by name

  • access: public
boolean removeDisplayGroup (string $name)
  • string $name
removeElement (line 1208)

Remove element

  • access: public
boolean removeElement (string $name)
  • string $name
removeSubForm (line 1711)

Remove form subForm/subform

  • access: public
boolean removeSubForm (string $name)
  • string $name
render (line 2878)

Render form

  • access: public
string render ([ $view = null])
reset (line 282)

Reset values of form

  • access: public
Zend_Form reset ()
rewind (line 3210)

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

  • access: public
void rewind ()

Implementation of:
Iterator::rewind
setAction (line 746)

Set form action

  • access: public
Zend_Form setAction (string $action)
  • string $action
setAttrib (line 652)

Set form attribute

  • access: public
Zend_Form setAttrib (string $key, mixed $value)
  • string $key
  • mixed $value
setAttribs (line 681)

Set multiple form attributes at once

Overwrites any previously set attributes.

  • access: public
Zend_Form setAttribs ( $attribs)
  • array $attribs
setConfig (line 392)

Set form state from config object

  • access: public
Zend_Form setConfig ( $config)
setDecorators (line 2714)

Overwrite all decorators

  • access: public
Zend_Form setDecorators ( $decorators)
  • array $decorators
setDefault (line 1289)

Set default value for an element

  • access: public
Zend_Form setDefault (string $name, mixed $value)
  • string $name
  • mixed $value
setDefaultDisplayGroupClass (line 1752)

Set default display group class

  • access: public
Zend_Form setDefaultDisplayGroupClass (string $class)
  • string $class
setDefaults (line 1254)

Set default values for elements

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

  • access: public
Zend_Form setDefaults ( $defaults)
  • array $defaults
setDescription (line 940)

Set form description

  • access: public
Zend_Form setDescription (string $value)
  • string $value
setDisableLoadDefaultDecorators (line 3243)

Set flag to disable loading default decorators

  • access: public
Zend_Form setDisableLoadDefaultDecorators (bool $flag)
  • bool $flag
setDisableTranslator (line 3023)

Indicate whether or not translation should be disabled

  • access: public
Zend_Form setDisableTranslator (bool $flag)
  • bool $flag
setDisplayGroupDecorators (line 2848)

Set all display group decorators as specified

  • access: public
Zend_Form setDisplayGroupDecorators ( $decorators)
  • array $decorators
setDisplayGroups (line 1929)

Add multiple display groups (overwrites)

  • access: public
Zend_Form setDisplayGroups ( $groups)
  • array $groups
setElementDecorators (line 2811)

Set all element decorators as specified

  • access: public
Zend_Form setElementDecorators ( $decorators, [ $elements = null], [bool $include = true])
  • array $decorators
  • array|null $elements: Specific elements to decorate or exclude from decoration
  • bool $include: Whether $elements is an inclusion or exclusion list
setElementFilters (line 1477)

Set all elements' filters

  • access: public
Zend_Form setElementFilters ( $filters)
  • array $filters
setElements (line 1172)

Set form elements (overwrites existing elements)

  • access: public
Zend_Form setElements ( $elements)
  • array $elements
setElementsBelongTo (line 1491)

Set name of array elements belong to

  • access: public
Zend_Form setElementsBelongTo (string $array)
  • string $array
setEnctype (line 808)

Set encoding type

  • access: public
Zend_Form setEnctype (string $value)
  • string $value
setErrorMessages (line 2361)

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

  • access: public
Zend_Form setErrorMessages ( $messages)
  • array $messages
setErrors (line 2433)

Overwrite any previously set error messages and flag as failed validation

  • access: public
Zend_Form setErrors ( $messages)
  • array $messages
setIsArray (line 1560)

Set flag indicating elements belong to array

  • access: public
Zend_Form setIsArray (bool $flag)
  • bool $flag: Value of flag
setLegend (line 918)

Set form legend

  • access: public
Zend_Form setLegend (string $value)
  • string $value
setMethod (line 777)

Set form method

Only values in $_methods() allowed

  • throws: Zend_Form_Exception
  • access: public
Zend_Form setMethod (string $method)
  • string $method
setName (line 850)

Set form name

  • access: public
Zend_Form setName (string $name)
  • string $name
setOptions (line 309)

Set form state from options array

  • access: public
Zend_Form setOptions ( $options)
  • array $options
setOrder (line 962)

Set form order

  • access: public
Zend_Form setOrder (int $index)
  • int $index
setPluginLoader (line 408)

Set plugin loaders for use with decorators and elements

  • throws: Zend_Form_Exception on invalid type
  • access: public
Zend_Form setPluginLoader ( $loader, [string $type = null])
setSubFormDecorators (line 2863)

Set all subform decorators as specified

  • access: public
Zend_Form setSubFormDecorators ( $decorators)
  • array $decorators
setSubForms (line 1674)

Set multiple form subForms/subforms (overwrites)

  • access: public
Zend_Form setSubForms ( $subForms)
  • array $subForms
setTranslator (line 2922)

Set translator object

  • access: public
Zend_Form setTranslator ([Zend_Translate|Zend_Translate_Adapter|null $translator = null])
setView (line 2575)

Set view object

  • access: public
Zend_Form setView ([ $view = null])

Redefined in descendants as:
translatorIsDisabled (line 3034)

Is translation disabled?

  • access: public
bool translatorIsDisabled ()
valid (line 3221)

Determine if current element/subform/display group is valid

  • access: public
bool valid ()

Implementation of:
Iterator::valid
_addDisplayGroupObject (line 1842)

Add a display group object (used with cloning)

  • access: protected
Zend_Form _addDisplayGroupObject (Zend_Form_DisplayGroup $group, [string|null $name = null])
_array_replace_recursive (line 2184)

This is a helper function until php 5.3 is widespreaded

  • access: protected
void _array_replace_recursive ( $into)
  • array $into
_attachToArray (line 2124)

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

  • access: protected
array _attachToArray (mixed $value, string $arrayPath)
  • mixed $value: The value to attach
  • string $arrayPath: Given array path to convert and attach to.
_dissolveArrayUnsetKey (line 2099)

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

  • access: protected
array _dissolveArrayUnsetKey (array $array, string|null $arrayPath, string $key)
  • array $array
  • string|null $arrayPath
  • string $key
_dissolveArrayValue (line 2066)

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

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

  • access: protected
string _dissolveArrayValue (array $value, string $arrayPath)
  • array $value: Array to walk
  • string $arrayPath: Array notation path of the part to extract
_getArrayName (line 2036)

Determine array key name from given value

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

  • access: protected
string _getArrayName (string $value)
  • string $value
_getDecorator (line 2606)

Instantiate a decorator based on class name or class name fragment

  • access: protected
Zend_Form_Decorator_Interface _getDecorator (string $name, null|array $options)
  • string $name
  • null|array $options
_getErrorMessages (line 3355)

Retrieve optionally translated custom error messages

  • access: protected
array _getErrorMessages ()
_getIsRendered (line 992)

Get the value of $_isRendered member

  • access: protected
void _getIsRendered ()
_loadDecorator (line 3319)

Lazy-load a decorator

  • access: protected
Zend_Form_Decorator_Interface _loadDecorator ( $decorator, mixed $name)
  • array $decorator: Decorator type and options
  • mixed $name: Decorator name or alias
_setElementsBelongTo (line 1519)

Set array to which elements belong

  • access: protected
void _setElementsBelongTo ([string $name = null])
  • string $name: Element name
_setIsRendered (line 983)

When calling renderFormElements or render this method

is used to set $_isRendered member to prevent repeatedly merging belongsTo setting

  • access: protected
void _setIsRendered ()
_sort (line 3284)

Sort items according to their order

  • access: protected
void _sort ()
__call (line 3133)

Overloading: allow rendering specific decorators

Call renderDecoratorName() to render a specific decorator.

  • throws: Zend_Form_Exception for invalid decorator or invalid method call
  • access: public
string __call (string $method, array $args)
  • string $method
  • array $args
__clone (line 250)

Clone form object and all children

  • access: public
void __clone ()
__get (line 3045)

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

  • access: public
Zend_Form_Element|Zend_Form|null __get (string $name)
  • string $name
__isset (line 3094)

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

  • access: public
boolean __isset (string $name)
  • string $name
__set (line 3066)

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

  • throws: Zend_Form_Exception for invalid $value
  • access: public
void __set (string $name, Zend_Form_Element|Zend_Form $value)
__toString (line 2900)

Serialize as string

Proxies to render().

  • access: public
string __toString ()
__unset (line 3112)

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

  • access: public
void __unset (string $name)
  • string $name
Class Constants
DECORATOR = 'DECORATOR' (line 38)

Plugin loader type constants

ELEMENT = 'ELEMENT' (line 39)

Plugin loader type constants

ENCTYPE_MULTIPART = 'multipart/form-data' (line 55)

Encoding type constants

ENCTYPE_URLENCODED = 'application/x-www-form-urlencoded' (line 54)

Encoding type constants

METHOD_DELETE = 'delete' (line 45)

Method type constants

METHOD_GET = 'get' (line 46)

Method type constants

METHOD_POST = 'post' (line 47)

Method type constants

METHOD_PUT = 'put' (line 48)

Method type constants

Documentation generated on Mon, 21 Jun 2010 15:24:21 -0400 by phpDocumentor 1.4.3