Last active
December 19, 2015 10:29
-
-
Save tomphp/5940505 to your computer and use it in GitHub Desktop.
How to set up the annotation builder so it can use the hydrator manager
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* This is the setup required to make an annotation builder able to load | |
* a hydrator from annotation via the HydratorManager. | |
*/ | |
$annotationBuilder = new \Zend\Form\Annotation\AnnotationBuilder(); | |
$factory = new \Zend\Form\Factory($serviceLocator->get('FormElementManager')); | |
$annotationBuilder->setFormFactory($factory); | |
$form = $annotationBuilder->createForm($myEntity); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment