Class AnnotationBuilder

Summary

Fully Qualified Name: Zend\Form\Annotation\AnnotationBuilder
Implements: EventManagerAwareInterface, FormFactoryAwareInterface

Description

Parses the properties of a class for annotations in order to create a form and input filter definition.

Methods

Name Description Defined By
createForm() Create a form from an object. AnnotationBuilder
getAnnotationManager() Retrieve annotation manager AnnotationBuilder
getAnnotationParser() AnnotationBuilder
getEntity() Get the entity used to construct the form. AnnotationBuilder
getEventManager() Get event manager AnnotationBuilder
getFormFactory() Retrieve form factory AnnotationBuilder
getFormSpecification() Creates and returns a form specification for use with a factory AnnotationBuilder
preserveDefinedOrder() AnnotationBuilder
setAnnotationManager() Set annotation manager to use when building form from annotations AnnotationBuilder
setEventManager() Set event manager instance AnnotationBuilder
setFormFactory() Set form factory to use when building form from annotations AnnotationBuilder
setPreserveDefinedOrder() AnnotationBuilder

Method Details

createForm()

Create a form from an object.

Parameter Name Type Description
$entity string|object

Returns: \Zend\Form\Form

getAnnotationManager()

Retrieve annotation manager

If none is currently set, creates one with default annotations.

Returns: \AnnotationManager

getAnnotationParser()

Returns: \Zend\Code\Annotation\Parser\DoctrineAnnotationParser

getEntity()

Get the entity used to construct the form.

Returns: object

getEventManager()

Get event manager

Returns: \EventManagerInterface

getFormFactory()

Retrieve form factory

Lazy-loads the default form factory if none is currently set.

Returns: \Factory

getFormSpecification()

Creates and returns a form specification for use with a factory

Parses the object provided, and processes annotations for the class and all properties. Information from annotations is then used to create specifications for a form, its elements, and its input filter.

Parameter Name Type Description
$entity string|object Either

Returns: \ArrayObject

preserveDefinedOrder()

Returns: bool

setAnnotationManager()

Set annotation manager to use when building form from annotations

Parameter Name Type Description
$annotationManager \AnnotationManager

Returns: \AnnotationBuilder

setEventManager()

Set event manager instance

Parameter Name Type Description
$events \EventManagerInterface

Returns: \AnnotationBuilder

setFormFactory()

Set form factory to use when building form from annotations

Parameter Name Type Description
$formFactory \Factory

Returns: \AnnotationBuilder

setPreserveDefinedOrder()

Parameter Name Type Description
$preserveDefinedOrder bool

Returns: $this

Top