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/InteractiveTreeModule.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/InteractiveTreeModule.php')
| -rw-r--r-- | app/Module/InteractiveTreeModule.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/app/Module/InteractiveTreeModule.php b/app/Module/InteractiveTreeModule.php index c7de450c6b..e0676ca79d 100644 --- a/app/Module/InteractiveTreeModule.php +++ b/app/Module/InteractiveTreeModule.php @@ -27,7 +27,7 @@ use Fisharebest\Webtrees\Menu; * Class InteractiveTreeModule * Tip : you could change the number of generations loaded before ajax calls both in individual page and in treeview page to optimize speed and server load */ -class InteractiveTreeModule extends AbstractModule implements ModuleTabInterface,ModuleChartInterface { +class InteractiveTreeModule extends AbstractModule implements ModuleTabInterface, ModuleChartInterface { /** {@inheritdoc} */ public function getTitle() { return /* I18N: Name of a module */ I18N::translate('Interactive tree'); @@ -75,19 +75,22 @@ class InteractiveTreeModule extends AbstractModule implements ModuleTabInterface /** * 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(), - 'module.php?mod=tree&mod_action=treeview&rootid=' . $individual->getXref() . '&ged=' . $WT_TREE->getNameUrl(), + 'module.php?mod=tree&mod_action=treeview&rootid=' . $individual->getXref() . '&ged=' . $individual->getTree()->getNameUrl(), 'menu-chart-tree', 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); } |
