Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update AjaxEntityType for symfony2.2 compatibility

  • Loading branch information...
commit 1cc7edde0a26d1821bf72e86bc0a439bb4f175a7 1 parent c3626f8
@danielholmes danielholmes authored
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;
+ ));
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.