Skip to content
This repository

Update AjaxEntityType for symfony2.2 compatibility #241

Merged
merged 1 commit into from about 1 year ago

2 participants

Daniel Holmes Bilal Amarni
Daniel Holmes

No description provided.

Bilal Amarni bamarni merged commit c3bdd45 into from March 15, 2013
Bilal Amarni bamarni closed this March 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Mar 15, 2013
Daniel Holmes Update AjaxEntityType for symfony2.2 compatibility 1cc7edd
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 4 additions and 5 deletions. Show diff stats Hide diff stats

  1. 9  Form/Doctrine/Type/AjaxEntityType.php
9  Form/Doctrine/Type/AjaxEntityType.php
@@ -13,6 +13,7 @@
13 13
 
14 14
 use Symfony\Component\Form\AbstractType;
15 15
 use Symfony\Component\OptionsResolver\Options;
  16
+use Symfony\Component\OptionsResolver\OptionsResolverInterface;
16 17
 
17 18
 use Doctrine\Common\Persistence\ManagerRegistry;
18 19
 
@@ -40,11 +41,11 @@ public function __construct(ManagerRegistry $registry)
40 41
     /**
41 42
      * {@inheritdoc}
42 43
      */
43  
-    public function getDefaultOptions(array $options)
  44
+    public function setDefaultOptions(OptionsResolverInterface $resolver)
44 45
     {
45 46
         $registry = $this->registry;
46 47
 
47  
-        $options = array(
  48
+        $resolver->setDefaults(array(
48 49
             'em'            => null,
49 50
             'class'         => null,
50 51
             'property'      => null,
@@ -63,9 +64,7 @@ public function getDefaultOptions(array $options)
63 64
                     $options['ajax']
64 65
                 );
65 66
             }
66  
-        );
67  
-
68  
-        return $options;
  67
+        ));
69 68
     }
70 69
 
71 70
     /**
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.