xref: /webtrees/app/Module/FactSourcesReportModule.php (revision e2a378d30d9bd3fff591da7a11c7cb5ead502323)
18c2e8227SGreg Roach<?php
28c2e8227SGreg Roachnamespace Fisharebest\Webtrees;
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 */
188c2e8227SGreg Roach
198c2e8227SGreg Roach/**
208c2e8227SGreg Roach * Class FactSourcesReportModule
218c2e8227SGreg Roach */
22*e2a378d3SGreg Roachclass FactSourcesReportModule extends AbstractModule implements ModuleReportInterface {
238c2e8227SGreg Roach	/** {@inheritdoc} */
248c2e8227SGreg Roach	public function getTitle() {
258c2e8227SGreg Roach		// This text also appears in the .XML file - update both together
268c2e8227SGreg Roach		return /* I18N: Name of a module/report */ I18N::translate('Source');
278c2e8227SGreg Roach	}
288c2e8227SGreg Roach
298c2e8227SGreg Roach	/** {@inheritdoc} */
308c2e8227SGreg Roach	public function getDescription() {
318c2e8227SGreg Roach		// This text also appears in the .XML file - update both together
328c2e8227SGreg Roach		return /* I18N: Description of the “Source” module */ I18N::translate('A report of the information provided by a source.');
338c2e8227SGreg Roach	}
348c2e8227SGreg Roach
358c2e8227SGreg Roach	/** {@inheritdoc} */
368c2e8227SGreg Roach	public function defaultAccessLevel() {
374b9ff166SGreg Roach		return Auth::PRIV_USER;
388c2e8227SGreg Roach	}
398c2e8227SGreg Roach
408c2e8227SGreg Roach	/** {@inheritdoc} */
418c2e8227SGreg Roach	public function getReportMenus() {
424b9ff166SGreg Roach		global $WT_TREE;
434b9ff166SGreg Roach
448c2e8227SGreg Roach		$menus = array();
458c2e8227SGreg Roach		$menu = new Menu(
468c2e8227SGreg Roach			$this->getTitle(),
474b9ff166SGreg Roach			'reportengine.php?ged=' . $WT_TREE->getNameUrl() . '&amp;action=setup&amp;report=' . WT_MODULES_DIR . $this->getName() . '/report.xml',
488c2e8227SGreg Roach			'menu-report-' . $this->getName()
498c2e8227SGreg Roach		);
508c2e8227SGreg Roach		$menus[] = $menu;
518c2e8227SGreg Roach
528c2e8227SGreg Roach		return $menus;
538c2e8227SGreg Roach	}
548c2e8227SGreg Roach}
55