| Fully Qualified Name: | Zend\Form\FormInterface |
| Extends: | FieldsetInterface |
| Name | Description | Defined By |
|---|---|---|
| add() | Add an element or fieldset | FieldsetInterface |
| allowObjectBinding() | Checks if the object can be set in this fieldset | FieldsetInterface |
| allowValueBinding() | Checks if this fieldset can bind data | FieldsetInterface |
| bind() | Bind an object to the element | FormInterface |
| bindValues() | Bind values to the bound object | FieldsetInterface |
| get() | Retrieve a named element or fieldset | FieldsetInterface |
| getAttribute() | Retrieve a single element attribute | ElementInterface |
| getAttributes() | Retrieve all attributes at once | ElementInterface |
| getData() | Retrieve the validated data | FormInterface |
| getElements() | Retrieve all attached elements | FieldsetInterface |
| getFieldsets() | Retrieve all attached fieldsets | FieldsetInterface |
| getHydrator() | Get the hydrator used when binding an object to the element | FieldsetInterface |
| getInputFilter() | Retrieve input filter | FormInterface |
| getLabel() | Retrieve the label (if any) used for this element | ElementInterface |
| getMessages() | Get validation error messages, if any | ElementInterface |
| getName() | Retrieve the element name | ElementInterface |
| getObject() | Get the object used by the hydrator | FieldsetInterface |
| getOption() | return the specified option | ElementInterface |
| getOptions() | get the defined options | ElementInterface |
| getValue() | Retrieve the element value | ElementInterface |
| has() | Does the fieldset have an element/fieldset by the given name? | FieldsetInterface |
| hasAttribute() | Return true if a specific attribute is set | ElementInterface |
| isValid() | Validate the form | FormInterface |
| populateValues() | Recursively populate value attributes of elements | FieldsetInterface |
| prepareElement() | Prepare the form element (mostly used for rendering purposes) | ElementPrepareAwareInterface |
| remove() | Remove a named element or fieldset | FieldsetInterface |
| setAttribute() | Set a single element attribute | ElementInterface |
| setAttributes() | Set many attributes at once | ElementInterface |
| setBindOnValidate() | Whether or not to bind values to the bound object when validation succeeds | FormInterface |
| setData() | Set data to validate and/or populate elements | FormInterface |
| setFormFactory() | Compose a form factory into the object | FormFactoryAwareInterface |
| setHydrator() | Set the hydrator to use when binding an object to the element | FieldsetInterface |
| setInputFilter() | Set input filter | FormInterface |
| setLabel() | Set the label (if any) used for this element | ElementInterface |
| setMessages() | Set a list of messages to report when validation fails | ElementInterface |
| setName() | Set the name of this element | ElementInterface |
| setObject() | Set the object used by the hydrator | FieldsetInterface |
| setOption() | Set a single option for an element | ElementInterface |
| setOptions() | Set options for an element | ElementInterface |
| setPriority() | Set/change the priority of an element or fieldset | FieldsetInterface |
| setValidationGroup() | Set the validation group (set of values to validate) | FormInterface |
| setValue() | Set the value of the element | ElementInterface |
Add an element or fieldset
$flags could contain metadata such as the alias under which to register the element or fieldset, order in which to prioritize it, etc.
| Parameter Name | Type | Description |
|---|---|---|
| $elementOrFieldset | array|\Traversable|\ElementInterface | Typically, |
| $flags | array |
Returns: \FieldsetInterface
Checks if the object can be set in this fieldset
| Parameter Name | Type | Description |
|---|---|---|
| $object | ||
| $object |
Returns: bool
Checks if this fieldset can bind data
Returns: bool
Bind an object to the element
Allows populating the object with validated values.
| Parameter Name | Type | Description |
|---|---|---|
| $object | object | |
| $flags | int |
Returns: mixed
Bind values to the bound object
| Parameter Name | Type | Description |
|---|---|---|
| $values | array |
Returns: mixed
Retrieve a named element or fieldset
| Parameter Name | Type | Description |
|---|---|---|
| $elementOrFieldset | string |
Returns: \ElementInterface
Retrieve a single element attribute
| Parameter Name | Type | Description |
|---|---|---|
| $key | string |
Returns: mixed
Retrieve all attributes at once
Returns: array|\Traversable
Retrieve the validated data
By default, retrieves normalized values; pass one of the VALUES_* constants to shape the behavior.
| Parameter Name | Type | Description |
|---|---|---|
| $flag | int |
Returns: array|object
Retrieve all attached elements
Storage is an implementation detail of the concrete class.
Returns: array|\Traversable
Retrieve all attached fieldsets
Storage is an implementation detail of the concrete class.
Returns: array|\Traversable
Get the hydrator used when binding an object to the element
Returns: null|\HydratorInterface
Retrieve input filter
Returns: \InputFilterInterface
Retrieve the label (if any) used for this element
Returns: string
Get validation error messages, if any
Returns a list of validation failure messages, if any.
Returns: array|\Traversable
Retrieve the element name
Returns: string
Get the object used by the hydrator
Returns: mixed
return the specified option
| Parameter Name | Type | Description |
|---|---|---|
| $option | string |
Returns: null|mixed
get the defined options
Returns: array
Retrieve the element value
Returns: mixed
Does the fieldset have an element/fieldset by the given name?
| Parameter Name | Type | Description |
|---|---|---|
| $elementOrFieldset | string |
Returns: bool
Return true if a specific attribute is set
| Parameter Name | Type | Description |
|---|---|---|
| $key | string |
Returns: bool
Validate the form
Typically, will proxy to the composed input filter.
Returns: bool
Recursively populate value attributes of elements
| Parameter Name | Type | Description |
|---|---|---|
| $data | array|\Traversable |
Returns: void
Prepare the form element (mostly used for rendering purposes)
| Parameter Name | Type | Description |
|---|---|---|
| $form | \FormInterface |
Returns: mixed
Remove a named element or fieldset
| Parameter Name | Type | Description |
|---|---|---|
| $elementOrFieldset | string |
Returns: \FieldsetInterface
Set a single element attribute
| Parameter Name | Type | Description |
|---|---|---|
| $key | string | |
| $value | mixed |
Returns: \ElementInterface
Set many attributes at once
Implementation will decide if this will overwrite or merge.
| Parameter Name | Type | Description |
|---|---|---|
| $arrayOrTraversable | array|\Traversable |
Returns: \ElementInterface
Whether or not to bind values to the bound object when validation succeeds
| Parameter Name | Type | Description |
|---|---|---|
| $bindOnValidateFlag | int |
Returns: void
Set data to validate and/or populate elements
Typically, also passes data on to the composed input filter.
| Parameter Name | Type | Description |
|---|---|---|
| $data | array|\ArrayAccess |
Returns: \FormInterface
Compose a form factory into the object
| Parameter Name | Type | Description |
|---|---|---|
| $factory | \Factory |
Returns:
Set the hydrator to use when binding an object to the element
| Parameter Name | Type | Description |
|---|---|---|
| $hydrator | \HydratorInterface |
Returns: \FieldsetInterface
Set input filter
| Parameter Name | Type | Description |
|---|---|---|
| $inputFilter | \InputFilterInterface |
Returns: \FormInterface
Set the label (if any) used for this element
| Parameter Name | Type | Description |
|---|---|---|
| $label | ||
| $label |
Returns: \ElementInterface
Set a list of messages to report when validation fails
| Parameter Name | Type | Description |
|---|---|---|
| $messages | array|\Traversable |
Returns: \ElementInterface
Set the name of this element
In most cases, this will proxy to the attributes for storage, but is present to indicate that elements are generally named.
| Parameter Name | Type | Description |
|---|---|---|
| $name | string |
Returns: \ElementInterface
Set the object used by the hydrator
| Parameter Name | Type | Description |
|---|---|---|
| $object | ||
| $object |
Returns: \FieldsetInterface
Set a single option for an element
| Parameter Name | Type | Description |
|---|---|---|
| $key | string | |
| $value | mixed |
Returns: self
Set options for an element
| Parameter Name | Type | Description |
|---|---|---|
| $options | array|\Traversable |
Returns: \ElementInterface
Set/change the priority of an element or fieldset
| Parameter Name | Type | Description |
|---|---|---|
| $elementOrFieldset | string | |
| $priority | int |
Returns: \FieldsetInterface
Set the validation group (set of values to validate)
Typically, proxies to the composed input filter
Returns: \FormInterface
Set the value of the element
| Parameter Name | Type | Description |
|---|---|---|
| $value | mixed |
Returns: \ElementInterface