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/TimelineChartModule.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/TimelineChartModule.php')
| -rw-r--r-- | app/Module/TimelineChartModule.php | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/app/Module/TimelineChartModule.php b/app/Module/TimelineChartModule.php index 286704ddf3..60ef02a9a2 100644 --- a/app/Module/TimelineChartModule.php +++ b/app/Module/TimelineChartModule.php @@ -52,23 +52,26 @@ class TimelineChartModule extends AbstractModule implements ModuleChartInterface public function defaultAccessLevel() { return Auth::PRIV_PRIVATE; } - + /** * 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(), - 'timeline.php?pids%5B%5D=' . $individual->getXref() . '&ged=' . $WT_TREE->getNameUrl(), - 'menu-chart-timeline', + $this->getTitle(), + 'timeline.php?pids%5B%5D=' . $individual->getXref() . '&ged=' . $individual->getTree()->getNameUrl(), + 'menu-chart-timeline', 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; } |
