Zend Framework
3.0
|
Parses the properties of a class for annotations in order to create a form and input filter definition. More...
Public Member Functions | |
setFormFactory (Factory $formFactory) | |
Set form factory to use when building form from annotations. | |
setAnnotationManager (AnnotationManager $annotationManager) | |
Set annotation manager to use when building form from annotations. | |
setEventManager (EventManagerInterface $events) | |
Set event manager instance. | |
getFormFactory () | |
Retrieve form factory. | |
getAnnotationManager () | |
Retrieve annotation manager. | |
getEventManager () | |
Get event manager. | |
getFormSpecification ($entity) | |
Creates and returns a form specification for use with a factory. | |
createForm ($entity) | |
Create a form from an object. | |
getEntity () | |
Get the entity used to construct the form. | |
setPreserveDefinedOrder ($preserveDefinedOrder) | |
preserveDefinedOrder () | |
getAnnotationParser () | |
Protected Member Functions | |
configureForm ($annotations, $reflection, $formSpec, $filterSpec) | |
Configure the form specification from annotations. | |
configureElement ($annotations, $reflection, $formSpec, $filterSpec) | |
Configure an element from annotations. | |
discoverName ($annotations, $reflection) | |
Discover the name of the given form or element. | |
checkForExclude ($annotations) | |
Determine if an element is marked to exclude from the definitions. | |
Static Protected Member Functions | |
static | isSubclassOf ($className, $type) |
Checks if the object has this class as one of its parents. | |
Protected Attributes | |
$annotationParser | |
$annotationManager | |
$events | |
$formFactory | |
$entity | |
$defaultAnnotations | |
$preserveDefinedOrder = false | |
Parses the properties of a class for annotations in order to create a form and input filter definition.
|
protected |
Determine if an element is marked to exclude from the definitions.
AnnotationCollection | $annotations |
|
protected |
Configure an element from annotations.
AnnotationCollection | $annotations | |
\Zend\Code\Reflection\PropertyReflection | $reflection | |
ArrayObject | $formSpec | |
ArrayObject | $filterSpec |
|
protected |
Configure the form specification from annotations.
AnnotationCollection | $annotations | |
ClassReflection | $reflection | |
ArrayObject | $formSpec | |
ArrayObject | $filterSpec |
createForm | ( | $entity | ) |
Create a form from an object.
string | object | $entity |
|
protected |
Discover the name of the given form or element.
AnnotationCollection | $annotations | |
\Reflector | $reflection |
getAnnotationManager | ( | ) |
Retrieve annotation manager.
If none is currently set, creates one with default annotations.
getAnnotationParser | ( | ) |
getEntity | ( | ) |
Get the entity used to construct the form.
getEventManager | ( | ) |
getFormFactory | ( | ) |
getFormSpecification | ( | $entity | ) |
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.
string | object | $entity | Either an instance or a valid class name for an entity |
Exception\InvalidArgumentException | if $entity is not an object or class name |
|
staticprotected |
Checks if the object has this class as one of its parents.
string | $className | |
string | $type |
preserveDefinedOrder | ( | ) |
setAnnotationManager | ( | AnnotationManager | $annotationManager | ) |
Set annotation manager to use when building form from annotations.
AnnotationManager | $annotationManager |
setEventManager | ( | EventManagerInterface | $events | ) |
Set event manager instance.
EventManagerInterface | $events |
Implements EventManagerAwareInterface.
setFormFactory | ( | Factory | $formFactory | ) |
Set form factory to use when building form from annotations.
Factory | $formFactory |
Implements FormFactoryAwareInterface.
setPreserveDefinedOrder | ( | $preserveDefinedOrder | ) |
bool | $preserveDefinedOrder |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |