summaryrefslogtreecommitdiff
path: root/app/Module.php
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@gmail.com>2016-04-10 15:14:21 +0100
committerGreg Roach <fisharebest@gmail.com>2016-04-11 19:41:58 +0100
commit4eb71cfaf9604652cd62536a0b3b56c6dfd715ad (patch)
treedf6374baef0b06b98ed2fdd84859d3c81f835325 /app/Module.php
parent168ff6f357afa9bbd5aa14c12670d19e51ee770c (diff)
downloadwebtrees-4eb71cfaf9604652cd62536a0b3b56c6dfd715ad.tar.gz
webtrees-4eb71cfaf9604652cd62536a0b3b56c6dfd715ad.tar.bz2
webtrees-4eb71cfaf9604652cd62536a0b3b56c6dfd715ad.zip
Charts as modules - more work
Diffstat (limited to 'app/Module.php')
-rw-r--r--app/Module.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/Module.php b/app/Module.php
index bd8725cdd1..22a17f81b4 100644
--- a/app/Module.php
+++ b/app/Module.php
@@ -170,6 +170,18 @@ class Module {
}
/**
+ * Get a list of modules which (a) provide a chart and (b) we have permission to see.
+ *
+ * @param Tree $tree
+ * @param string $module
+ *
+ * @return bool
+ */
+ public static function isActiveChart(Tree $tree, $module) {
+ return array_key_exists($module, self::getActiveModulesByComponent($tree, 'chart'));
+ }
+
+ /**
* Get a list of modules which (a) provide a menu and (b) we have permission to see.
*
* @param Tree $tree