94. Class

94.1. Zend\Form\Annotation\ElementAnnotationsListener

Default listeners for element annotations

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

  • AllowEmpty
  • Attributes
  • ErrorMessage
  • Filter
  • Flags
  • Input
  • Hydrator
  • Object
  • Required
  • Type
  • Validator

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.

94.1.1. Methods

94.1.1.1. attach

attach()

Attach listeners

Parameters:EventManagerInterface
Return type:void

94.1.1.2. handleAllowEmptyAnnotation

handleAllowEmptyAnnotation()

Handle the AllowEmpty annotation

Sets the allow_empty flag on the input specification array.

Parameters:ZendEventManagerEventInterface
Return type:void

94.1.1.3. handleAttributesAnnotation

handleAttributesAnnotation()

Handle the Attributes annotation

Sets the attributes array of the element specification.

Parameters:ZendEventManagerEventInterface
Return type:void

94.1.1.4. handleComposedObjectAnnotation

handleComposedObjectAnnotation()

Allow creating fieldsets from composed entity properties

Parameters:ZendEventManagerEventInterface
Return type:void

94.1.1.5. handleErrorMessageAnnotation

handleErrorMessageAnnotation()

Handle the ErrorMessage annotation

Sets the error_message of the input specification.

Parameters:ZendEventManagerEventInterface
Return type:void

94.1.1.6. handleExcludeAnnotation

handleExcludeAnnotation()

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

Parameters:ZendEventManagerEventInterface
Return type:bool

94.1.1.7. handleFilterAnnotation

handleFilterAnnotation()

Handle the Filter annotation

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

Parameters:ZendEventManagerEventInterface
Return type:void

94.1.1.8. handleFlagsAnnotation

handleFlagsAnnotation()

Handle the Flags annotation

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

Parameters:ZendEventManagerEventInterface
Return type:void

94.1.1.9. handleHydratorAnnotation

handleHydratorAnnotation()

Handle the Hydrator annotation

Sets the hydrator class to use in the fieldset specification.

Parameters:ZendEventManagerEventInterface
Return type:void

94.1.1.10. handleInputAnnotation

handleInputAnnotation()

Handle the Input annotation

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

Parameters:ZendEventManagerEventInterface
Return type:void

94.1.1.11. handleObjectAnnotation

handleObjectAnnotation()

Handle the Object annotation

Sets the object to bind to the form or fieldset

Parameters:ZendEventManagerEventInterface
Return type:void

94.1.1.12. handleOptionsAnnotation

handleOptionsAnnotation()

Handle the Options annotation

Sets the element options in the specification.

Parameters:ZendEventManagerEventInterface
Return type:void

94.1.1.13. handleRequiredAnnotation

handleRequiredAnnotation()

Handle the Required annotation

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

Parameters:ZendEventManagerEventInterface
Return type:void

94.1.1.14. handleTypeAnnotation

handleTypeAnnotation()

Handle the Type annotation

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

Parameters:ZendEventManagerEventInterface
Return type:void

94.1.1.15. handleValidatorAnnotation

handleValidatorAnnotation()

Handle the Validator annotation

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

Parameters:ZendEventManagerEventInterface
Return type:void