-
-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated for AnnotationBuilder. #233
Conversation
spiffyjr
commented
Jun 5, 2013
- Made it possible to use the relative path to the targetEntity by hooking into the class metadata.
- Options are merged instead of overridden so you can do things like @Form\Options({"property":"name"}) to set options for the EntityObject's.
- Added relevent tests.
* Made it possible to use the relative path to the targetEntity by hooking into the class metadata. * Options are merged instead of overridden so you can do things like @Form\Options({"property":"name"}) to set options for the EntityObject's. * Added relevent tests.
@Ocramius This should be ready for merge once the tests are passing (coding standards). |
Don't merge yet - noticed this doesn't work with non-annotation mappings (xml/yaml). Going to see if I can work around that. |
Test pass - status set to READY. |
*/ | ||
public function setAnnotationManager(AnnotationManager $annotationManager) | ||
public function getObjectManager() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the getter required?
break; | ||
/** @var \Doctrine\ORM\Mapping\ClassMetadataInfo $metadata */ | ||
$metadata = $event->getParam('metadata'); | ||
if ($metadata && $metadata->isAssociationInverseSide($event->getParam('name'))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
directly return the result of this conditional instead of using an if
$inputSpec = $event->getParam('inputSpec'); | ||
$elementSpec = $event->getParam('elementSpec'); | ||
|
||
if ($metadata['type'] & ClassMetadataInfo::TO_MANY) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above - these checks can be done via $classMetadata->isCollectionValuedAssociation($field)
[READY] Updated for AnnotationBuilder.