Fully Qualified Name: | Zend\Form\Annotation\ElementAnnotationsListener |
Extends: | AbstractAnnotationsListener |
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.
{@inheritDoc}
Parameter Name | Type | Description |
---|---|---|
$events | ||
$priority |
Returns:
{@inheritDoc}
Parameter Name | Type | Description |
---|---|---|
$events |
Returns:
Discover the fallback name via reflection
Parameter Name | Type | Description |
---|---|---|
$e | \Zend\EventManager\EventInterface |
Returns: string
Handle the AllowEmpty annotation
Sets the allow_empty flag on the input specification array.
Parameter Name | Type | Description |
---|---|---|
$e | \Zend\EventManager\EventInterface |
Returns: void
Handle the Attributes annotation
Sets the attributes array of the element specification.
Parameter Name | Type | Description |
---|---|---|
$e | \Zend\EventManager\EventInterface |
Returns: void
Allow creating fieldsets from composed entity properties
Parameter Name | Type | Description |
---|---|---|
$e | \Zend\EventManager\EventInterface |
Returns: void
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
Handle the ErrorMessage annotation
Sets the error_message of the input specification.
Parameter Name | Type | Description |
---|---|---|
$e | \Zend\EventManager\EventInterface |
Returns: void
Determine if the element has been marked to exclude from the definition
Parameter Name | Type | Description |
---|---|---|
$e | \Zend\EventManager\EventInterface |
Returns: bool
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
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
Handle the Hydrator annotation
Sets the hydrator class to use in the fieldset specification.
Parameter Name | Type | Description |
---|---|---|
$e | \Zend\EventManager\EventInterface |
Returns: void
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
Attempt to discover a name set via annotation
Parameter Name | Type | Description |
---|---|---|
$e | \Zend\EventManager\EventInterface |
Returns: bool|string
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
Handle the Options annotation
Sets the element options in the specification.
Parameter Name | Type | Description |
---|---|---|
$e | \Zend\EventManager\EventInterface |
Returns: void
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
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
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