@param null|int|string $name Optional name for the element
Parameters: | array – Optional options for the element |
---|
Set options for a fieldset. Accepted options are: - use_as_base_fieldset: is this fieldset use as the base fieldset?
Parameters: | array|Traversable – |
---|---|
Return type: | Element|ElementInterface |
Throws : | ExceptionInvalidArgumentException |
Compose a form factory to use when calling add() with a non-element/fieldset
Parameters: | Factory – |
---|---|
Return type: | Form |
Retrieve composed form factory
Lazy-loads one if none present.
Return type: | Factory |
---|
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.
Parameters: |
|
---|---|
Return type: | Fieldset|FieldsetInterface |
Throws : | ExceptionInvalidArgumentException |
Does the fieldset have an element/fieldset by the given name?
Parameters: | string – |
---|---|
Return type: | bool |
Retrieve a named element or fieldset
Parameters: | string – |
---|---|
Return type: | ElementInterface |
Remove a named element or fieldset
Parameters: | string – |
---|---|
Return type: | FieldsetInterface |
Set/change the priority of an element or fieldset
Parameters: |
|
---|---|
Return type: | FieldsetInterface |
Retrieve all attached elements
Storage is an implementation detail of the concrete class.
Return type: | array|Traversable |
---|
Retrieve all attached fieldsets
Storage is an implementation detail of the concrete class.
Return type: | array|Traversable |
---|
Set a hash of element names/messages to use when validation fails
Parameters: | array|Traversable – |
---|---|
Return type: | Element|ElementInterface|FieldsetInterface |
Throws : | ExceptionInvalidArgumentException |
Get validation error messages, if any
Returns a hash of element names/messages for all elements failing validation, or, if $elementName is provided, messages for that element only.
Parameters: | null|string – |
---|---|
Return type: | array|Traversable |
Throws : | ExceptionInvalidArgumentException |
Ensures state is ready for use. Here, we append the name of the fieldsets to every elements in order to avoid name clashes if the same fieldset is used multiple times
Parameters: | FormInterface – |
---|---|
Return type: | mixed|void |
Recursively populate values of attached elements and fieldsets
Parameters: | array|Traversable – |
---|---|
Return type: | void |
Throws : | ExceptionInvalidArgumentException |
Countable: return count of attached elements/fieldsets
Return type: | int |
---|
IteratorAggregate: return internal iterator
Return type: | PriorityQueue |
---|
Set the object used by the hydrator
Parameters: | object – |
---|---|
Return type: | Fieldset|FieldsetInterface |
Throws : | ExceptionInvalidArgumentException |
Checks if the object can be set in this fieldset
Parameters: | object – |
---|---|
Return type: | bool |
Set the hydrator to use when binding an object to the element
Parameters: | HydratorInterface – |
---|---|
Return type: | FieldsetInterface |
Get the hydrator used when binding an object to the fieldset
Will lazy-load HydratorArraySerializable if none is present.
Return type: | HydratorInterface |
---|
Checks if this fieldset can bind data
Return type: | bool |
---|
Bind values to the bound object
Parameters: | array – |
---|---|
Return type: | mixed|void |
Set if this fieldset is used as a base fieldset
Parameters: | bool – |
---|---|
Return type: | Fieldset |
Is this fieldset use as a base fieldset for a form ?
Return type: | bool |
---|
Extract values from the bound object
Return type: | array |
---|