summaryrefslogtreecommitdiff
path: root/app/Module/AncestorsChartModule.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Module/AncestorsChartModule.php')
-rw-r--r--app/Module/AncestorsChartModule.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/app/Module/AncestorsChartModule.php b/app/Module/AncestorsChartModule.php
index 58dacde50f..c75b4073b5 100644
--- a/app/Module/AncestorsChartModule.php
+++ b/app/Module/AncestorsChartModule.php
@@ -56,19 +56,22 @@ class AncestorsChartModule extends AbstractModule implements ModuleChartInterfac
/**
* 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(),
- 'ancestry.php?rootid=' . $individual->getXref() . '&ged=' . $WT_TREE->getNameUrl(),
+ 'ancestry.php?rootid=' . $individual->getXref() . '&ged=' . $individual->getTree()->getNameUrl(),
'menu-chart-ancestry',
array('rel' => 'nofollow')
);
}
+ /**
+ * Return a menu item for this chart - for use in individual boxes.
+ *
+ * @return Menu|null
+ */
public function getBoxChartMenu(Individual $individual) {
return $this->getChartMenu($individual);
}