summaryrefslogtreecommitdiff
path: root/app/Module/StatisticsChartModule.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/StatisticsChartModule.php
parent168ff6f357afa9bbd5aa14c12670d19e51ee770c (diff)
downloadwebtrees-4eb71cfaf9604652cd62536a0b3b56c6dfd715ad.tar.gz
webtrees-4eb71cfaf9604652cd62536a0b3b56c6dfd715ad.tar.bz2
webtrees-4eb71cfaf9604652cd62536a0b3b56c6dfd715ad.zip
Charts as modules - more work
Diffstat (limited to 'app/Module/StatisticsChartModule.php')
-rw-r--r--app/Module/StatisticsChartModule.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/app/Module/StatisticsChartModule.php b/app/Module/StatisticsChartModule.php
index d3e9c3c3ca..6e8777b794 100644
--- a/app/Module/StatisticsChartModule.php
+++ b/app/Module/StatisticsChartModule.php
@@ -56,19 +56,22 @@ class StatisticsChartModule extends AbstractModule implements ModuleChartInterfa
/**
* Return a menu item for this chart.
*
- * @return Menu
+ * @return Menu|null
*/
public function getChartMenu(Individual $individual) {
- global $controller, $WT_TREE;
-
return new Menu(
$this->getTitle(),
- 'statistics.php?ged=' . $WT_TREE->getNameUrl(),
+ 'statistics.php?ged=' . $individual->getTree()->getNameUrl(),
'menu-chart-statistics',
array('rel' => 'nofollow')
);
}
+ /**
+ * Return a menu item for this chart - for use in individual boxes.
+ *
+ * @return Menu|null
+ */
public function getBoxChartMenu(Individual $individual) {
return null;
}