__construct()
configureElement()
configureFieldset()
configureForm()
create()
createElement()
createFieldset()
createForm()
getFormElementManager()
getInputFilterFactory()
prepareAndInjectFieldsets()
setFormElementManager()
setInputFilterFactory()
getFactoryFromName()
getHydratorFromName()
prepareAndInjectElements()
prepareAndInjectFactory()
prepareAndInjectHydrator()
prepareAndInjectInputFilter()
prepareAndInjectObject()
prepareAndInjectValidationGroup()
validateSpecification()
$formElementManager
$inputFilterFactory
__construct(\Zend\Form\FormElementManager $formElementManager)
\Zend\Form\FormElementManager
configureElement(\Zend\Form\ElementInterface $element, array | \Traversable | \ArrayAccess $spec) : \Zend\Form\ElementInterface
Specification can contain any of the following: - type: the Element class to use; defaults to \Zend\Form\Element - 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
\Zend\Form\ElementInterface
array\Traversable\ArrayAccess
\Zend\Form\Exception\DomainException |
---|
configureFieldset(\Zend\Form\FieldsetInterface $fieldset, array | \Traversable | \ArrayAccess $spec) : \Zend\Form\FieldsetInterface
Specification can contain any of the following: - type: the Fieldset class to use; defaults to \Zend\Form\Fieldset - 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 - elements: an array or Traversable object where each entry is an array or ArrayAccess object containing the keys: - flags: (optional) array of flags to pass to FieldsetInterface::add() - spec: the actual element specification, per configureElement()
\Zend\Form\FieldsetInterface
array\Traversable\ArrayAccess
\Zend\Form\Exception\DomainException |
---|
configureForm(\Zend\Form\FormInterface $form, array | \Traversable | \ArrayAccess $spec) : \Zend\Form\FormInterface
Specification follows that of configureFieldset(), and adds the following keys:
\Zend\Form\FormInterface
array\Traversable\ArrayAccess
create(array | \Traversable $spec) : \Zend\Form\ElementInterface
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.
array\Traversable
\Zend\Form\Exception\DomainException |
---|
prepareAndInjectFieldsets(array | \Traversable | \ArrayAccess $fieldsets, \Zend\Form\FieldsetInterface $masterFieldset, string $method) : void
array\Traversable\ArrayAccess
\Zend\Form\FieldsetInterface
string
Method invoking this one (for exception messages)
setFormElementManager(\Zend\Form\FormElementManager $formElementManager) : \Zend\Form\Factory
setInputFilterFactory(\Zend\InputFilter\Factory $inputFilterFactory) : \Zend\Form\Factory
getFactoryFromName(string $factoryName) : mixed
getHydratorFromName(string $hydratorName) : mixed
prepareAndInjectElements(array | \Traversable | \ArrayAccess $elements, \Zend\Form\FieldsetInterface $fieldset, string $method) : void
array\Traversable\ArrayAccess
\Zend\Form\FieldsetInterface
string
Method invoking this one (for exception messages)
prepareAndInjectFactory(string | array | \Zend\Form\Factory $factoryOrName, \Zend\Form\FieldsetInterface $fieldset, string $method) : void
Takes a string indicating a factory class name (or a concrete instance), try first to instantiates the class by pulling it from service manager, and injects the factory instance into the fieldset.
stringarray\Zend\Form\Factory
\Zend\Form\FieldsetInterface
string
\Zend\Form\Exception\DomainException |
If $factoryOrName is not a string, does not resolve to a known class, or the class does not extend Form\Factory |
---|
prepareAndInjectHydrator(string | array | \Zend\Stdlib\Hydrator\HydratorInterface $hydratorOrName, \Zend\Form\FieldsetInterface $fieldset, string $method) : void
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.
stringarray\Zend\Stdlib\Hydrator\HydratorInterface
\Zend\Form\FieldsetInterface
string
\Zend\Form\Exception\DomainException |
If $hydratorOrName is not a string, does not resolve to a known class, or the class does not implement Hydrator\HydratorInterface |
---|
prepareAndInjectInputFilter(string | array | \Traversable $spec, \Zend\Form\FormInterface $form, string $method) : void
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.
stringarray\Traversable
\Zend\Form\FormInterface
string
\Zend\Form\Exception\DomainException |
for unknown InputFilter class or invalid InputFilter instance |
---|
prepareAndInjectObject(string $objectName, \Zend\Form\FieldsetInterface $fieldset, string $method) : void
Takes a string indicating a class name, instantiates the class by that name, and injects the class instance as the bound object.
string
\Zend\Form\FieldsetInterface
string
\Zend\Form\Exception\DomainException |
---|
prepareAndInjectValidationGroup(string | array | \Traversable $spec, \Zend\Form\FormInterface $form, string $method) : void
Takes an array of elements names
stringarray\Traversable
\Zend\Form\FormInterface
string
\Zend\Form\Exception\DomainException |
if validation group given is not an array |
---|
validateSpecification(array | \Traversable | \ArrayAccess $spec, string $method) : array | \ArrayAccess
Ensures we have an array, Traversable, or ArrayAccess object, and returns it.
array\Traversable\ArrayAccess
string
Method invoking the validator
\Zend\Form\Exception\InvalidArgumentException |
for invalid $spec |
---|
array
\ArrayAccess