diff options
| author | Greg Roach <fisharebest@gmail.com> | 2016-04-10 15:14:21 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2016-04-11 19:41:58 +0100 |
| commit | 4eb71cfaf9604652cd62536a0b3b56c6dfd715ad (patch) | |
| tree | df6374baef0b06b98ed2fdd84859d3c81f835325 /app/Module/DescendancyChartModule.php | |
| parent | 168ff6f357afa9bbd5aa14c12670d19e51ee770c (diff) | |
| download | webtrees-4eb71cfaf9604652cd62536a0b3b56c6dfd715ad.tar.gz webtrees-4eb71cfaf9604652cd62536a0b3b56c6dfd715ad.tar.bz2 webtrees-4eb71cfaf9604652cd62536a0b3b56c6dfd715ad.zip | |
Charts as modules - more work
Diffstat (limited to 'app/Module/DescendancyChartModule.php')
| -rw-r--r-- | app/Module/DescendancyChartModule.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/app/Module/DescendancyChartModule.php b/app/Module/DescendancyChartModule.php index cb218cbad2..7412d1047f 100644 --- a/app/Module/DescendancyChartModule.php +++ b/app/Module/DescendancyChartModule.php @@ -56,19 +56,22 @@ class DescendancyChartModule extends AbstractModule implements ModuleChartInterf /** * 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(), - 'descendancy.php?rootid=' . $individual->getXref() . '&ged=' . $WT_TREE->getNameUrl(), + 'descendancy.php?rootid=' . $individual->getXref() . '&ged=' . $individual->getTree()->getNameUrl(), 'menu-chart-descendants', 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); } |
