Class Factory

Summary

Fully Qualified Name: Zend\Form\Factory

Description

Methods

Name Description Defined By
__construct() Factory
configureElement() Configure an element based on the provided specification Factory
configureFieldset() Configure a fieldset based on the provided specification Factory
configureForm() Configure a form based on the provided specification Factory
create() Create an element, fieldset, or form Factory
createElement() Create an element Factory
createFieldset() Create a fieldset Factory
createForm() Create a form Factory
getFormElementManager() Get form element manager Factory
getInputFilterFactory() Get current input filter factory Factory
prepareAndInjectFieldsets() Takes a list of fieldset specifications, creates the fieldsets, and injects them into the master fieldset Factory
setFormElementManager() Set the form element manager Factory
setInputFilterFactory() Set input filter factory to use when creating forms Factory

Method Details

__construct()

Parameter Name Type Description
$formElementManager \FormElementManager
$inputFilterFactory

Returns:

configureElement()

Configure an element based on the provided specification

Specification can contain any of the following:

Parameter Name Type Description
$element \ElementInterface
$spec array|\Traversable|\ArrayAccess

Returns: \ElementInterface

configureFieldset()

Configure a fieldset based on the provided specification

Specification can contain any of the following:

Parameter Name Type Description
$fieldset \FieldsetInterface
$spec array|\Traversable|\ArrayAccess

Returns: \FieldsetInterface

configureForm()

Configure a form based on the provided specification

Specification follows that of {@link configureFieldset()}, and adds the following keys:

Parameter Name Type Description
$form \FormInterface
$spec array|\Traversable|\ArrayAccess

Returns: \FormInterface

create()

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.

Parameter Name Type Description
$spec array|\Traversable

Returns: \ElementInterface

createElement()

Create an element

Parameter Name Type Description
$spec array

Returns: \ElementInterface

createFieldset()

Create a fieldset

Parameter Name Type Description
$spec array

Returns: \ElementInterface

createForm()

Create a form

Parameter Name Type Description
$spec array

Returns: \ElementInterface

getFormElementManager()

Get form element manager

Returns: \FormElementManager

getInputFilterFactory()

Get current input filter factory

If none provided, uses an unconfigured instance.

Returns: \InputFilterFactory

prepareAndInjectFieldsets()

Takes a list of fieldset specifications, creates the fieldsets, and injects them into the master fieldset

Parameter Name Type Description
$fieldsets array|\Traversable|\ArrayAccess
$masterFieldset \FieldsetInterface
$method string Method

Returns: void

setFormElementManager()

Set the form element manager

Parameter Name Type Description
$formElementManager \FormElementManager

Returns: \Factory

setInputFilterFactory()

Set input filter factory to use when creating forms

Parameter Name Type Description
$inputFilterFactory \InputFilterFactory

Returns: \Factory

Top