1<?php 2namespace Fisharebest\Webtrees; 3 4/** 5 * webtrees: online genealogy 6 * Copyright (C) 2015 webtrees development team 7 * This program is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * You should have received a copy of the GNU General Public License 16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 17 */ 18 19/** 20 * Class RelatedIndividualsReportModule 21 */ 22class RelatedIndividualsReportModule extends Module implements ModuleReportInterface { 23 /** {@inheritdoc} */ 24 public function getTitle() { 25 // This text also appears in the .XML file - update both together 26 return /* I18N: Name of a report */ I18N::translate('Related individuals'); 27 } 28 29 /** {@inheritdoc} */ 30 public function getDescription() { 31 // This text also appears in the .XML file - update both together 32 return /* I18N: Description of the “Related individuals” module */ I18N::translate('A report of the individuals that are closely related to an individual.'); 33 } 34 35 /** {@inheritdoc} */ 36 public function defaultAccessLevel() { 37 return WT_PRIV_PUBLIC; 38 } 39 40 /** {@inheritdoc} */ 41 public function getReportMenus() { 42 global $controller; 43 44 $menus = array(); 45 $menu = new Menu( 46 $this->getTitle(), 47 'reportengine.php?ged=' . WT_GEDURL . '&action=setup&report=' . WT_MODULES_DIR . $this->getName() . '/report.xml&pid=' . $controller->getSignificantIndividual()->getXref(), 48 'menu-report-' . $this->getName() 49 ); 50 $menus[] = $menu; 51 52 return $menus; 53 } 54} 55