10e62c4b8SGreg Roach<?php 20e62c4b8SGreg Roach/** 30e62c4b8SGreg Roach * webtrees: online genealogy 40e62c4b8SGreg Roach * Copyright (C) 2015 webtrees development team 50e62c4b8SGreg Roach * This program is free software: you can redistribute it and/or modify 60e62c4b8SGreg Roach * it under the terms of the GNU General Public License as published by 70e62c4b8SGreg Roach * the Free Software Foundation, either version 3 of the License, or 80e62c4b8SGreg Roach * (at your option) any later version. 90e62c4b8SGreg Roach * This program is distributed in the hope that it will be useful, 100e62c4b8SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of 110e62c4b8SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 120e62c4b8SGreg Roach * GNU General Public License for more details. 130e62c4b8SGreg Roach * You should have received a copy of the GNU General Public License 140e62c4b8SGreg Roach * along with this program. If not, see <http://www.gnu.org/licenses/>. 150e62c4b8SGreg Roach */ 1676692c8bSGreg Roachnamespace Fisharebest\Webtrees\Module; 1776692c8bSGreg Roach 180e62c4b8SGreg Roachuse Fisharebest\Webtrees\Auth; 190e62c4b8SGreg Roachuse Fisharebest\Webtrees\I18N; 200e62c4b8SGreg Roachuse Fisharebest\Webtrees\Menu; 210e62c4b8SGreg Roach 220e62c4b8SGreg Roach/** 230e62c4b8SGreg Roach * Class BirthDeathMarriageReportModule 240e62c4b8SGreg Roach */ 250e62c4b8SGreg Roachclass BirthDeathMarriageReportModule extends AbstractModule implements ModuleReportInterface { 2676692c8bSGreg Roach /** 2776692c8bSGreg Roach * How should this module be labelled on tabs, menus, etc.? 2876692c8bSGreg Roach * 2976692c8bSGreg Roach * @return string 3076692c8bSGreg Roach */ 310e62c4b8SGreg Roach public function getTitle() { 320e62c4b8SGreg Roach // This text also appears in the .XML file - update both together 330e62c4b8SGreg Roach return /* I18N: Name of a module/report. “Vital records” are life events - birth/marriage/death */ I18N::translate('Vital records'); 340e62c4b8SGreg Roach } 350e62c4b8SGreg Roach 3676692c8bSGreg Roach /** 3776692c8bSGreg Roach * A sentence describing what this module does. 3876692c8bSGreg Roach * 3976692c8bSGreg Roach * @return string 4076692c8bSGreg Roach */ 410e62c4b8SGreg Roach public function getDescription() { 420e62c4b8SGreg Roach // This text also appears in the .XML file - update both together 430e62c4b8SGreg Roach return /* I18N: Description of the “Vital records” module. “Vital records” are life events - birth/marriage/death */ I18N::translate('A report of vital records for a given date or place.'); 440e62c4b8SGreg Roach } 450e62c4b8SGreg Roach 4676692c8bSGreg Roach /** 4776692c8bSGreg Roach * What is the default access level for this module? 4876692c8bSGreg Roach * 4976692c8bSGreg Roach * Some modules are aimed at admins or managers, and are not generally shown to users. 5076692c8bSGreg Roach * 5176692c8bSGreg Roach * @return int 5276692c8bSGreg Roach */ 530e62c4b8SGreg Roach public function defaultAccessLevel() { 540e62c4b8SGreg Roach return Auth::PRIV_PRIVATE; 550e62c4b8SGreg Roach } 560e62c4b8SGreg Roach 5776692c8bSGreg Roach /** 58*0ee13198SGreg Roach * Return a menu item for this report. 5976692c8bSGreg Roach * 60*0ee13198SGreg Roach * @return Menu 6176692c8bSGreg Roach */ 62*0ee13198SGreg Roach public function getReportMenu() { 630e62c4b8SGreg Roach global $WT_TREE; 640e62c4b8SGreg Roach 65*0ee13198SGreg Roach return new Menu( 660e62c4b8SGreg Roach $this->getTitle(), 670e62c4b8SGreg Roach 'reportengine.php?ged=' . $WT_TREE->getNameUrl() . '&action=setup&report=' . WT_MODULES_DIR . $this->getName() . '/report.xml', 68*0ee13198SGreg Roach 'menu-report-' . $this->getName(), 69*0ee13198SGreg Roach array('rel' => 'nofollow') 700e62c4b8SGreg Roach ); 710e62c4b8SGreg Roach } 720e62c4b8SGreg Roach} 73