Add an element or fieldset
If $elementOrFieldset is an array or Traversable, passes the argument on to the composed factory to create the object before attaching it.
$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: | ZendFormFieldset|ZendFormFieldsetInterface|ZendFormFormInterface |
Ensures state is ready for use
Marshalls the input filter, to ensure validation error messages are available, and prepares any elements and/or fieldsets that require preparation.
| Return type: | Form |
|---|
Set data to validate and/or populate elements
Typically, also passes data on to the composed input filter.
| Parameters: | array|ArrayAccess|Traversable – |
|---|---|
| Return type: | Form|FormInterface |
| Throws : | ExceptionInvalidArgumentException |
Bind an object to the form
Ensures the object is populated with validated values.
| Parameters: |
|
|---|---|
| Return type: | mixed|void |
| Throws : | ExceptionInvalidArgumentException |
Set the hydrator to use when binding an object to the element
| Parameters: | HydratorInterface – |
|---|---|
| Return type: | FieldsetInterface |
Bind values to the bound object
| Parameters: | array – |
|---|---|
| Return type: | mixed |
Parse filtered values and return only posted fields for binding
| Parameters: |
|
|---|---|
| Return type: | array |
Set flag indicating whether or not to bind values on successful validation
| Parameters: | int – |
|---|---|
| Return type: | void|Form |
| Throws : | ExceptionInvalidArgumentException |
Will we bind values to the bound object on successful validation?
| Return type: | bool |
|---|
Set the base fieldset to use when hydrating
| Parameters: | FieldsetInterface – |
|---|---|
| Return type: | Form |
| Throws : | ExceptionInvalidArgumentException |
Get the base fieldset to use when hydrating
| Return type: | FieldsetInterface |
|---|
Validate the form
Typically, will proxy to the composed input filter.
| Return type: | bool |
|---|---|
| Throws : | ExceptionDomainException |
Retrieve the validated data
By default, retrieves normalized values; pass one of the FormInterface::VALUES_* constants to shape the behavior.
| Parameters: | int – |
|---|---|
| Return type: | array|object |
| Throws : | ExceptionDomainException |
Set the validation group (set of values to validate)
Typically, proxies to the composed input filter
| Return type: | Form|FormInterface |
|---|
Prepare the validation group in case Collection elements were used (this function also handle the case where elements could have been dynamically added or removed from a collection using JavaScript)
| Parameters: |
|
|---|
Set the input filter used by this form
| Parameters: | InputFilterInterface – |
|---|---|
| Return type: | FormInterface |
Retrieve input filter used by this form
| Return type: | null|InputFilterInterface |
|---|
Set flag indicating whether or not to scan elements and fieldsets for defaults
| Parameters: | bool – |
|---|---|
| Return type: | Form |
Should we use input filter defaults from elements and fieldsets?
| Return type: | bool |
|---|
Set flag indicating whether or not to prefer the form input filter over element and fieldset defaults
| Parameters: | bool – |
|---|---|
| Return type: | Form |
Should we use form input filter over element input filter defaults from elements and fieldsets?
| Return type: | bool |
|---|
Attach defaults provided by the elements to the input filter
| Parameters: |
|
|---|---|
| Return type: | void |
Are the form elements/fieldsets names wrapped by the form name ?
| Parameters: | bool – |
|---|---|
| Return type: | Form |
If true, form elements/fieldsets name’s are wrapped around the form name itself
| Return type: | bool |
|---|
Recursively extract values for elements and sub-fieldsets, and populate form values
| Return type: | array |
|---|