Methods

Add an element or fieldset

add(array | \Traversable | \Zend\Form\ElementInterface $elementOrFieldset, array $flags) : \Zend\Form\FieldsetInterface

$flags could contain metadata such as the alias under which to register the element or fieldset, order in which to prioritize it, etc.

Parameters

$elementOrFieldset

array\Traversable\Zend\Form\ElementInterface

Typically, only allow objects implementing ElementInterface; however, keeping it flexible to allow a factory-based form implementation as well

$flags

array

Returns

Checks if the object can be set in this fieldset

allowObjectBinding($object) : bool

Parameters

$object

Returns

bool

Checks if this fieldset can bind data

allowValueBinding() : bool

Returns

bool

Bind values to the bound object

bindValues(array $values) : mixed

Parameters

$values

array

Returns

mixed

Retrieve a named element or fieldset

get(string $elementOrFieldset) : \Zend\Form\ElementInterface

Parameters

$elementOrFieldset

string

Returns

Retrieve all attached elements

getElements() : array | \Traversable

Storage is an implementation detail of the concrete class.

Returns

array\Traversable

Retrieve all attached fieldsets

getFieldsets() : array | \Traversable

Storage is an implementation detail of the concrete class.

Returns

array\Traversable

Get the hydrator used when binding an object to the element

getHydrator() : null | \Zend\Stdlib\Hydrator\HydratorInterface

Get the object used by the hydrator

getObject() : mixed

Returns

mixed

Does the fieldset have an element/fieldset by the given name?

has(string $elementOrFieldset) : bool

Parameters

$elementOrFieldset

string

Returns

bool

Recursively populate value attributes of elements

populateValues(array | \Traversable $data) : void

Parameters

$data

array\Traversable

Remove a named element or fieldset

remove(string $elementOrFieldset) : \Zend\Form\FieldsetInterface

Parameters

$elementOrFieldset

string

Returns

Set the hydrator to use when binding an object to the element

setHydrator(\Zend\Stdlib\Hydrator\HydratorInterface $hydrator) : \Zend\Form\FieldsetInterface

Set the object used by the hydrator

setObject($object) : \Zend\Form\FieldsetInterface

Parameters

$object

Returns

Set/change the priority of an element or fieldset

setPriority(string $elementOrFieldset, int $priority) : \Zend\Form\FieldsetInterface

Parameters

$elementOrFieldset

string

$priority

int

Returns