Browse Source

Call Admin::initialize later

Emmanuel Vella 13 years ago
parent
commit
9c717cb614
1 changed files with 2 additions and 2 deletions
  1. 2 2
      DependencyInjection/Compiler/AddDependencyCallsCompilerPass.php

+ 2 - 2
DependencyInjection/Compiler/AddDependencyCallsCompilerPass.php

@@ -199,8 +199,6 @@ class AddDependencyCallsCompilerPass implements CompilerPassInterface
 
         $definition->addMethodCall('setLabel', array($label));
 
-        $definition->addMethodCall('initialize');
-
         if (!$definition->hasMethodCall('setTemplates')) {
             $definition->addMethodCall('setTemplates', array('%sonata.admin.configuration.templates%'));
         }
@@ -209,6 +207,8 @@ class AddDependencyCallsCompilerPass implements CompilerPassInterface
             $definition->addMethodCall('setSecurityInformation', array('%sonata.admin.configuration.security.information%'));
         }
 
+        $definition->addMethodCall('initialize');
+
         return $definition;
     }