Fully Qualified Name: | Laminas\Form\Annotation\AnnotationBuilder |
Implements: | EventManagerAwareInterface, FormFactoryAwareInterface |
Parses the properties of a class for annotations in order to create a form and input filter definition.
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 |
Create a form from an object.
Parameter Name | Type | Description |
---|---|---|
$entity | string|object |
Returns: \FormInterface
Retrieve annotation manager
If none is currently set, creates one with default annotations.
Returns: \AnnotationManager
Returns: \Parser\DoctrineAnnotationParser
Get the entity used to construct the form.
Returns: object
Get event manager
Returns: \EventManagerInterface
Retrieve form factory
Lazy-loads the default form factory if none is currently set.
Returns: \Factory
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
Returns: bool
Set annotation manager to use when building form from annotations
Parameter Name | Type | Description |
---|---|---|
$annotationManager | \AnnotationManager |
Returns: $this
Set event manager instance
Parameter Name | Type | Description |
---|---|---|
$events | \EventManagerInterface |
Returns: $this
Set form factory to use when building form from annotations
Parameter Name | Type | Description |
---|---|---|
$formFactory | \Factory |
Returns: $this
Parameter Name | Type | Description |
---|---|---|
$preserveDefinedOrder | bool |
Returns: $this