. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Module; use Fisharebest\Webtrees\I18N; use Fisharebest\Webtrees\Individual; /** * Class FamilyNavigatorModule */ class FamilyNavigatorModule extends AbstractModule implements ModuleSidebarInterface { use ModuleSidebarTrait; /** * How should this module be identified in the control panel, etc.? * * @return string */ public function title(): string { /* I18N: Name of a module/sidebar */ return I18N::translate('Family navigator'); } public function description(): string { /* I18N: Description of the “Family navigator” module */ return I18N::translate('A sidebar showing an individual’s close families and relatives.'); } /** * The default position for this sidebar. It can be changed in the control panel. * * @return int */ public function defaultSidebarOrder(): int { return 2; } /** * @param Individual $individual * * @return bool */ public function hasSidebarContent(Individual $individual): bool { return true; } /** * Load this sidebar synchronously. * * @param Individual $individual * * @return string */ public function getSidebarContent(Individual $individual): string { return view('modules/family_nav/sidebar', ['individual' => $individual]); } }