diff options
Diffstat (limited to 'app/Module/CompactTreeChartModule.php')
| -rw-r--r-- | app/Module/CompactTreeChartModule.php | 115 |
1 files changed, 63 insertions, 52 deletions
diff --git a/app/Module/CompactTreeChartModule.php b/app/Module/CompactTreeChartModule.php index b20ab25de6..645319d2c3 100644 --- a/app/Module/CompactTreeChartModule.php +++ b/app/Module/CompactTreeChartModule.php @@ -23,60 +23,71 @@ use Fisharebest\Webtrees\Menu; /** * Class CompactTreeChartModule */ -class CompactTreeChartModule extends AbstractModule implements ModuleChartInterface { - /** - * How should this module be labelled on tabs, menus, etc.? - * - * @return string - */ - public function getTitle() { - return /* I18N: Name of a module/chart */ I18N::translate('Compact tree'); - } +class CompactTreeChartModule extends AbstractModule implements ModuleChartInterface +{ + /** + * How should this module be labelled on tabs, menus, etc.? + * + * @return string + */ + public function getTitle() + { + return /* I18N: Name of a module/chart */ + I18N::translate('Compact tree'); + } - /** - * A sentence describing what this module does. - * - * @return string - */ - public function getDescription() { - return /* I18N: Description of the “CompactTreeChart” module */ I18N::translate('A chart of an individual’s ancestors, as a compact tree.'); - } + /** + * A sentence describing what this module does. + * + * @return string + */ + public function getDescription() + { + return /* I18N: Description of the “CompactTreeChart” module */ + I18N::translate('A chart of an individual’s ancestors, as a compact tree.'); + } - /** - * What is the default access level for this module? - * - * Some modules are aimed at admins or managers, and are not generally shown to users. - * - * @return int - */ - public function defaultAccessLevel() { - return Auth::PRIV_PRIVATE; - } + /** + * What is the default access level for this module? + * + * Some modules are aimed at admins or managers, and are not generally shown to users. + * + * @return int + */ + public function defaultAccessLevel() + { + return Auth::PRIV_PRIVATE; + } - /** - * Return a menu item for this chart. - * - * @param Individual $individual - * - * @return Menu|null - */ - public function getChartMenu(Individual $individual) { - return new Menu( - $this->getTitle(), - route('compact-tree', ['xref' => $individual->getXref(), 'ged' => $individual->getTree()->getName()]), - 'menu-chart-compact', - ['rel' => 'nofollow'] - ); - } + /** + * Return a menu item for this chart. + * + * @param Individual $individual + * + * @return Menu|null + */ + public function getChartMenu(Individual $individual) + { + return new Menu( + $this->getTitle(), + route('compact-tree', [ + 'xref' => $individual->getXref(), + 'ged' => $individual->getTree()->getName(), + ]), + 'menu-chart-compact', + ['rel' => 'nofollow'] + ); + } - /** - * Return a menu item for this chart - for use in individual boxes. - * - * @param Individual $individual - * - * @return Menu|null - */ - public function getBoxChartMenu(Individual $individual) { - return $this->getChartMenu($individual); - } + /** + * Return a menu item for this chart - for use in individual boxes. + * + * @param Individual $individual + * + * @return Menu|null + */ + public function getBoxChartMenu(Individual $individual) + { + return $this->getChartMenu($individual); + } } |
