18c2e8227SGreg Roach<?php 2*0e62c4b8SGreg Roachnamespace Fisharebest\Webtrees\Module; 38c2e8227SGreg Roach 48c2e8227SGreg Roach/** 58c2e8227SGreg Roach * webtrees: online genealogy 68c2e8227SGreg Roach * Copyright (C) 2015 webtrees development team 78c2e8227SGreg Roach * This program is free software: you can redistribute it and/or modify 88c2e8227SGreg Roach * it under the terms of the GNU General Public License as published by 98c2e8227SGreg Roach * the Free Software Foundation, either version 3 of the License, or 108c2e8227SGreg Roach * (at your option) any later version. 118c2e8227SGreg Roach * This program is distributed in the hope that it will be useful, 128c2e8227SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of 138c2e8227SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 148c2e8227SGreg Roach * GNU General Public License for more details. 158c2e8227SGreg Roach * You should have received a copy of the GNU General Public License 168c2e8227SGreg Roach * along with this program. If not, see <http://www.gnu.org/licenses/>. 178c2e8227SGreg Roach */ 18*0e62c4b8SGreg Roachuse Fisharebest\Webtrees\Auth; 19*0e62c4b8SGreg Roachuse Fisharebest\Webtrees\I18N; 20*0e62c4b8SGreg Roachuse Fisharebest\Webtrees\Menu; 218c2e8227SGreg Roach 228c2e8227SGreg Roach/** 238c2e8227SGreg Roach * Class RelatedIndividualsReportModule 248c2e8227SGreg Roach */ 25e2a378d3SGreg Roachclass RelatedIndividualsReportModule extends AbstractModule implements ModuleReportInterface { 268c2e8227SGreg Roach /** {@inheritdoc} */ 278c2e8227SGreg Roach public function getTitle() { 288c2e8227SGreg Roach // This text also appears in the .XML file - update both together 298c2e8227SGreg Roach return /* I18N: Name of a report */ I18N::translate('Related individuals'); 308c2e8227SGreg Roach } 318c2e8227SGreg Roach 328c2e8227SGreg Roach /** {@inheritdoc} */ 338c2e8227SGreg Roach public function getDescription() { 348c2e8227SGreg Roach // This text also appears in the .XML file - update both together 358c2e8227SGreg Roach return /* I18N: Description of the “Related individuals” module */ I18N::translate('A report of the individuals that are closely related to an individual.'); 368c2e8227SGreg Roach } 378c2e8227SGreg Roach 388c2e8227SGreg Roach /** {@inheritdoc} */ 398c2e8227SGreg Roach public function defaultAccessLevel() { 404b9ff166SGreg Roach return Auth::PRIV_PRIVATE; 418c2e8227SGreg Roach } 428c2e8227SGreg Roach 438c2e8227SGreg Roach /** {@inheritdoc} */ 448c2e8227SGreg Roach public function getReportMenus() { 454b9ff166SGreg Roach global $controller, $WT_TREE; 468c2e8227SGreg Roach 478c2e8227SGreg Roach $menus = array(); 488c2e8227SGreg Roach $menu = new Menu( 498c2e8227SGreg Roach $this->getTitle(), 504b9ff166SGreg Roach 'reportengine.php?ged=' . $WT_TREE->getNameUrl() . '&action=setup&report=' . WT_MODULES_DIR . $this->getName() . '/report.xml&pid=' . $controller->getSignificantIndividual()->getXref(), 518c2e8227SGreg Roach 'menu-report-' . $this->getName() 528c2e8227SGreg Roach ); 538c2e8227SGreg Roach $menus[] = $menu; 548c2e8227SGreg Roach 558c2e8227SGreg Roach return $menus; 568c2e8227SGreg Roach } 578c2e8227SGreg Roach} 58