Set input filter factory to use when creating forms
Parameters: | InputFilterFactory – |
---|---|
Return type: | Factory |
Get current input filter factory
If none provided, uses an unconfigured instance.
Return type: | InputFilterFactory |
---|
Set the form element manager
Parameters: | FormElementManager – |
---|---|
Return type: | Factory |
Get form element manager
Return type: | FormElementManager |
---|
Create an element, fieldset, or form
Introspects the ‘type’ key of the provided $spec, and determines what type is being requested; if none is provided, assumes the spec represents simply an element.
Parameters: | array|Traversable – |
---|---|
Return type: | ElementInterface |
Throws : | ExceptionDomainException |
Create an element
Parameters: | array – |
---|---|
Return type: | ElementInterface |
Create a fieldset
Parameters: | array – |
---|---|
Return type: | ElementInterface |
Configure an element based on the provided specification
Specification can contain any of the following: - type: the Element class to use; defaults to ZendFormElement - name: what name to provide the element, if any - options: an array, Traversable, or ArrayAccess object of element options - attributes: an array, Traversable, or ArrayAccess object of element
attributes to assign
Parameters: |
|
---|---|
Throws ExceptionDomainException: | |
Return type: | ElementInterface |
Configure a fieldset based on the provided specification
Specification can contain any of the following: - type: the Fieldset class to use; defaults to ZendFormFieldset - name: what name to provide the fieldset, if any - options: an array, Traversable, or ArrayAccess object of element options - attributes: an array, Traversable, or ArrayAccess object of element
attributes to assign
Parameters: |
|
---|---|
Throws ExceptionDomainException: | |
Return type: | FieldsetInterface |
Configure a form based on the provided specification
Specification follows that of {@link configureFieldset()}, and adds the following keys:
Parameters: |
|
---|---|
Return type: | FormInterface |
Validate a provided specification
Ensures we have an array, Traversable, or ArrayAccess object, and returns it.
Parameters: |
|
---|---|
Return type: | array|ArrayAccess |
Throws : | ExceptionInvalidArgumentException for invalid $spec |
Takes a list of element specifications, creates the elements, and injects them into the provided fieldset
Parameters: |
|
---|---|
Return type: | void |
Takes a list of fieldset specifications, creates the fieldsets, and injects them into the master fieldset
Parameters: |
|
---|---|
Return type: | void |
Prepare and inject an object
Takes a string indicating a class name, instantiates the class by that name, and injects the class instance as the bound object.
Parameters: |
|
---|---|
Throws ExceptionDomainException: | |
Return type: | void |
Prepare and inject a named hydrator
Takes a string indicating a hydrator class name (or a concrete instance), try first to instantiates the class by pulling it from service manager, and injects the hydrator instance into the form.
Parameters: |
|
---|---|
Return type: | void |
Throws : | ExceptionDomainException If $hydratorOrName is not a string, does not resolve to a known class, or the class does not implement HydratorHydratorInterface |
Prepare an input filter instance and inject in the provided form
If the input filter specified is a string, assumes it is a class name, and attempts to instantiate it. If the class does not exist, or does not extend InputFilterInterface, an exception is raised.
Otherwise, $spec is passed on to the attached InputFilter Factory instance in order to create the input filter.
Parameters: |
|
---|---|
Return type: | void |
Throws : | ExceptionDomainException for unknown InputFilter class or invalid InputFilter instance |
Prepare a validation group and inject in the provided form
Takes an array of elements names
Parameters: |
|
---|---|
Return type: | void |
Throws : | ExceptionDomainException if validation group given is not an array |