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