88. Class

88.1. Zend\Form\Annotation\AnnotationBuilder

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

88.1.1. Methods

88.1.1.1. setFormFactory

setFormFactory()

Set form factory to use when building form from annotations

Parameters:Factory
Return type:AnnotationBuilder

88.1.1.2. setAnnotationManager

setAnnotationManager()

Set annotation manager to use when building form from annotations

Parameters:AnnotationManager
Return type:AnnotationBuilder

88.1.1.3. setEventManager

setEventManager()

Set event manager instance

Parameters:EventManagerInterface
Return type:AnnotationBuilder

88.1.1.4. getFormFactory

getFormFactory()

Retrieve form factory

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

Return type:Factory

88.1.1.5. getAnnotationManager

getAnnotationManager()

Retrieve annotation manager

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

Return type:AnnotationManager

88.1.1.6. getEventManager

getEventManager()

Get event manager

Return type:EventManagerInterface

88.1.1.7. getFormSpecification

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.

Parameters:string|object – Either an instance or a valid class name for an entity
Throws ExceptionInvalidArgumentException:
 if $entity is not an object or class name
Return type:ArrayObject

88.1.1.8. createForm

createForm()

Create a form from an object.

Parameters:string|object
Return type:ZendFormForm

88.1.1.9. getEntity

getEntity()

Get the entity used to construct the form.

Return type:object

88.1.1.10. configureForm

configureForm()

Configure the form specification from annotations

Parameters:
  • AnnotationCollection
  • ClassReflection
  • ArrayObject
  • ArrayObject
Return type:

void @triggers discoverName

@triggers configureForm

88.1.1.11. configureElement

configureElement()

Configure an element from annotations

Parameters:
  • AnnotationCollection
  • ZendCodeReflectionPropertyReflection
  • ArrayObject
  • ArrayObject
Return type:

void @triggers checkForExclude

@triggers discoverName @triggers configureElement

88.1.1.12. discoverName

discoverName()

Discover the name of the given form or element

Parameters:
  • AnnotationCollection
  • Reflector
Return type:

string

88.1.1.13. checkForExclude

checkForExclude()

Determine if an element is marked to exclude from the definitions

Parameters:AnnotationCollection
Return type:true|false

88.1.1.14. isSubclassOf

isSubclassOf()

Checks if the object has this class as one of its parents

Parameters:
  • string
  • string
Return type:

bool