Skip to content
Browse files

Merge pull request #241 from danielholmes/patch-1

Update AjaxEntityType for symfony2.2 compatibility
  • Loading branch information...
2 parents c3626f8 + 1cc7edd commit c3bdd457e6cc1454ca423128732e8864d4630d94 @bamarni bamarni committed Mar 15, 2013
Showing with 4 additions and 5 deletions.
  1. +4 −5 Form/Doctrine/Type/AjaxEntityType.php
View
9 Form/Doctrine/Type/AjaxEntityType.php
@@ -13,6 +13,7 @@
use Symfony\Component\Form\AbstractType;
use Symfony\Component\OptionsResolver\Options;
+use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Doctrine\Common\Persistence\ManagerRegistry;
@@ -40,11 +41,11 @@ public function __construct(ManagerRegistry $registry)
/**
* {@inheritdoc}
*/
- public function getDefaultOptions(array $options)
+ public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$registry = $this->registry;
- $options = array(
+ $resolver->setDefaults(array(
'em' => null,
'class' => null,
'property' => null,
@@ -63,9 +64,7 @@ public function getDefaultOptions(array $options)
$options['ajax']
);
}
- );
-
- return $options;
+ ));
}
/**

0 comments on commit c3bdd45

Please sign in to comment.
Something went wrong with that request. Please try again.