Class FormAnnotationsListener

Summary

Fully Qualified Name: Zend\Form\Annotation\FormAnnotationsListener
Extends: AbstractAnnotationsListener

Description

Default listeners for form annotations

Defines and attaches a set of default listeners for form annotations (which are defined on object properties). These include:

See the individual annotation classes for more details. The handlers registered work with the annotation values, as well as the form specification passed in the event object.

Methods

Name Description Defined By
attach() Attach listeners FormAnnotationsListener
detach() {@inheritDoc} AbstractListenerAggregate
discoverFallbackName() Discover the fallback name via reflection AbstractAnnotationsListener
handleAttributesAnnotation() Handle the Attributes annotation FormAnnotationsListener
handleFlagsAnnotation() Handle the Flags annotation FormAnnotationsListener
handleHydratorAnnotation() Handle the Hydrator annotation FormAnnotationsListener
handleInputFilterAnnotation() Handle the InputFilter annotation FormAnnotationsListener
handleNameAnnotation() Attempt to discover a name set via annotation AbstractAnnotationsListener
handleObjectAnnotation() Handle the Object and Instance annotations FormAnnotationsListener
handleOptionsAnnotation() Handle the Options annotation FormAnnotationsListener
handleTypeAnnotation() Handle the Type annotation FormAnnotationsListener
handleValidationGroupAnnotation() Handle the ValidationGroup annotation FormAnnotationsListener

Method Details

attach()

Attach listeners

Parameter Name Type Description
$events \EventManagerInterface
$priority

Returns: void

detach()

{@inheritDoc}

Parameter Name Type Description
$events

Returns:

discoverFallbackName()

Discover the fallback name via reflection

Parameter Name Type Description
$e \Zend\EventManager\EventInterface

Returns: string

handleAttributesAnnotation()

Handle the Attributes annotation

Sets the attributes key of the form specification.

Parameter Name Type Description
$e \Zend\EventManager\EventInterface

Returns: void

handleFlagsAnnotation()

Handle the Flags annotation

Sets the flags key of the form specification.

Parameter Name Type Description
$e \Zend\EventManager\EventInterface

Returns: void

handleHydratorAnnotation()

Handle the Hydrator annotation

Sets the hydrator class to use in the form specification.

Parameter Name Type Description
$e \Zend\EventManager\EventInterface

Returns: void

handleInputFilterAnnotation()

Handle the InputFilter annotation

Sets the input filter class to use in the form specification.

Parameter Name Type Description
$e \Zend\EventManager\EventInterface

Returns: void

handleNameAnnotation()

Attempt to discover a name set via annotation

Parameter Name Type Description
$e \Zend\EventManager\EventInterface

Returns: bool|string

handleObjectAnnotation()

Handle the Object and Instance annotations

Sets the object to bind to the form or fieldset

Parameter Name Type Description
$e \Zend\EventManager\EventInterface

Returns: void

handleOptionsAnnotation()

Handle the Options annotation

Sets the options key of the form specification.

Parameter Name Type Description
$e \Zend\EventManager\EventInterface

Returns: void

handleTypeAnnotation()

Handle the Type annotation

Sets the form class to use in the form specification.

Parameter Name Type Description
$e \Zend\EventManager\EventInterface

Returns: void

handleValidationGroupAnnotation()

Handle the ValidationGroup annotation

Sets the validation group to use in the form specification.

Parameter Name Type Description
$e \Zend\EventManager\EventInterface

Returns: void

Top