Fully Qualified Name: | Zend\Form\FieldsetInterface |
Extends: | Countable, IteratorAggregate, ElementInterface, ElementPrepareAwareInterface, FormFactoryAwareInterface |
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 |
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 |
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 |
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 |
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 |
setFormFactory() | Compose a form factory into the object | FormFactoryAwareInterface |
setHydrator() | Set the hydrator to use when binding an object to the element | FieldsetInterface |
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 |
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 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 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 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
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
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 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 value of the element
Parameter Name | Type | Description |
---|---|---|
$value | mixed |
Returns: \ElementInterface