xref: /webtrees/app/Module/DescendancyReportModule.php (revision 1e71bdc0ba6fc5add8fed9a3beb51cfca09e47dd)
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 DescendancyReportModule
21 */
22class DescendancyReportModule 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 module/report */ I18N::translate('Descendants');
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 “Descendants” module */ I18N::translate('A report of an individual’s descendants, in a narrative style.');
33	}
34
35	/** {@inheritdoc} */
36	public function defaultAccessLevel() {
37		return Auth::PRIV_PRIVATE;
38	}
39
40	/** {@inheritdoc} */
41	public function getReportMenus() {
42		global $controller, $WT_TREE;
43
44		$menus = array();
45		$menu = new Menu(
46			$this->getTitle(),
47			'reportengine.php?ged=' . $WT_TREE->getNameUrl() . '&amp;action=setup&amp;report=' . WT_MODULES_DIR . $this->getName() . '/report.xml&amp;pid=' . $controller->getSignificantIndividual()->getXref(),
48			'menu-report-' . $this->getName()
49		);
50		$menus[] = $menu;
51
52		return $menus;
53	}
54}
55