Class ElementAnnotationsListener

Summary

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

Description

Default listeners for element annotations

Defines and attaches a set of default listeners for element 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 element and input specification passed in the event object.

Methods

Name Description Defined By
attach() {@inheritDoc} ElementAnnotationsListener
detach() {@inheritDoc} AbstractListenerAggregate
discoverFallbackName() Discover the fallback name via reflection AbstractAnnotationsListener
handleAllowEmptyAnnotation() Handle the AllowEmpty annotation ElementAnnotationsListener
handleAttributesAnnotation() Handle the Attributes annotation ElementAnnotationsListener
handleComposedObjectAnnotation() Allow creating fieldsets from composed entity properties ElementAnnotationsListener
handleContinueIfEmptyAnnotation() Handle the ContinueIfEmpty annotation ElementAnnotationsListener
handleErrorMessageAnnotation() Handle the ErrorMessage annotation ElementAnnotationsListener
handleExcludeAnnotation() Determine if the element has been marked to exclude from the definition ElementAnnotationsListener
handleFilterAnnotation() Handle the Filter annotation ElementAnnotationsListener
handleFlagsAnnotation() Handle the Flags annotation ElementAnnotationsListener
handleHydratorAnnotation() Handle the Hydrator annotation ElementAnnotationsListener
handleInputAnnotation() Handle the Input annotation ElementAnnotationsListener
handleNameAnnotation() Attempt to discover a name set via annotation AbstractAnnotationsListener
handleObjectAnnotation() Handle the Object and Instance annotations ElementAnnotationsListener
handleOptionsAnnotation() Handle the Options annotation ElementAnnotationsListener
handleRequiredAnnotation() Handle the Required annotation ElementAnnotationsListener
handleTypeAnnotation() Handle the Type annotation ElementAnnotationsListener
handleValidatorAnnotation() Handle the Validator annotation ElementAnnotationsListener

Method Details

attach()

{@inheritDoc}

Parameter Name Type Description
$events
$priority

Returns:

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

handleAllowEmptyAnnotation()

Handle the AllowEmpty annotation

Sets the allow_empty flag on the input specification array.

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

Returns: void

handleAttributesAnnotation()

Handle the Attributes annotation

Sets the attributes array of the element specification.

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

Returns: void

handleComposedObjectAnnotation()

Allow creating fieldsets from composed entity properties

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

Returns: void

handleContinueIfEmptyAnnotation()

Handle the ContinueIfEmpty annotation

Sets the continue_if_empty flag on the input specification array.

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

Returns: void

handleErrorMessageAnnotation()

Handle the ErrorMessage annotation

Sets the error_message of the input specification.

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

Returns: void

handleExcludeAnnotation()

Determine if the element has been marked to exclude from the definition

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

Returns: bool

handleFilterAnnotation()

Handle the Filter annotation

Adds a filter to the filter chain specification for the input.

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

Returns: void

handleFlagsAnnotation()

Handle the Flags annotation

Sets the element flags in the specification (used typically for setting priority).

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

Returns: void

handleHydratorAnnotation()

Handle the Hydrator annotation

Sets the hydrator class to use in the fieldset specification.

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

Returns: void

handleInputAnnotation()

Handle the Input annotation

Sets the filter specification for the current element to the specified input class name.

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 element options in the specification.

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

Returns: void

handleRequiredAnnotation()

Handle the Required annotation

Sets the required flag on the input based on the annotation value.

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

Returns: void

handleTypeAnnotation()

Handle the Type annotation

Sets the element class type to use in the element specification.

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

Returns: void

handleValidatorAnnotation()

Handle the Validator annotation

Adds a validator to the validator chain of the input specification.

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

Returns: void

Top