浏览代码

revert : add show_in_dashboard attribute in services declaration

Charley Maillot 13 年之前
父节点
当前提交
1f1bbf5994
共有 1 个文件被更改,包括 5 次插入0 次删除
  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])) {