Bladeren bron

revert : add show_in_dashboard attribute in services declaration

Charley Maillot 13 jaren geleden
bovenliggende
commit
1f1bbf5994
1 gewijzigde bestanden met toevoegingen van 5 en 0 verwijderingen
  1. 5 0
      DependencyInjection/Compiler/AddDependencyCallsCompilerPass.php

+ 5 - 0
DependencyInjection/Compiler/AddDependencyCallsCompilerPass.php

@@ -63,6 +63,11 @@ class AddDependencyCallsCompilerPass implements CompilerPassInterface
             $admins[] = $id;
             $classes[$class] = $id;
 
+            $showInDashBord = (boolean)(isset($attributes[0]['show_in_dashboard']) ? $attributes[0]['show_in_dashboard'] : true);
+            if (!$showInDashBord) {
+                continue;
+            }
+
             $group_name = isset($attributes[0]['group']) ? $attributes[0]['group'] : 'default';
 
             if (!isset($groupDefaults[$group_name])) {