Browse Source

Merge pull request #2739 from aitboudad/issue_2730

[Dashboard groups][compiler pass] fixed default value of item.
Thomas 10 years ago
parent
commit
8ac0191016

+ 6 - 1
DependencyInjection/Compiler/AddDependencyCallsCompilerPass.php

@@ -92,7 +92,12 @@ class AddDependencyCallsCompilerPass implements CompilerPassInterface
                     );
                 }
 
-                $groupDefaults[$resolvedGroupName]['items'][] = $id;
+                $groupDefaults[$resolvedGroupName]['items'][] = array(
+                    'admin'        => $id,
+                    'label'        => '',
+                    'route'        => '',
+                    'route_params' => array()
+                );
             }
         }
 

+ 1 - 0
Tests/Twig/Extension/SonataAdminExtensionTest.php

@@ -878,6 +878,7 @@ class SonataAdminExtensionTest extends \PHPUnit_Framework_TestCase
             "bar" => array(
                 "label" => "foo",
                 "icon"  => '<i class="fa fa-edit"></i>',
+                "label_catalogue"  => 'SonataAdminBundle',
                 "items" => array(
                     array(
                         "admin"        => "",