10e62c4b8SGreg Roach<?php 20e62c4b8SGreg Roach/** 30e62c4b8SGreg Roach * webtrees: online genealogy 48fcd0d32SGreg Roach * Copyright (C) 2019 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 */ 16e7f56f2aSGreg Roachdeclare(strict_types=1); 17e7f56f2aSGreg Roach 1876692c8bSGreg Roachnamespace Fisharebest\Webtrees\Module; 1976692c8bSGreg Roach 200e62c4b8SGreg Roachuse Fisharebest\Webtrees\I18N; 212c2c92e6SGreg Roachuse Fisharebest\Webtrees\Individual; 220e62c4b8SGreg Roachuse Fisharebest\Webtrees\Menu; 230e62c4b8SGreg Roach 240e62c4b8SGreg Roach/** 250e62c4b8SGreg Roach * Class BirthDeathMarriageReportModule 260e62c4b8SGreg Roach */ 2737eb8894SGreg Roachclass BirthDeathMarriageReportModule extends AbstractModule implements ModuleReportInterface 28c1010edaSGreg Roach{ 2949a243cbSGreg Roach use ModuleReportTrait; 3049a243cbSGreg Roach 3176692c8bSGreg Roach /** 32*0cfd6963SGreg Roach * How should this module be identified in the control panel, etc.? 3376692c8bSGreg Roach * 3476692c8bSGreg Roach * @return string 3576692c8bSGreg Roach */ 3649a243cbSGreg Roach public function title(): string 37c1010edaSGreg Roach { 380e62c4b8SGreg Roach // This text also appears in the .XML file - update both together 39bbb76c12SGreg Roach /* I18N: Name of a module/report. “Vital records” are life events - birth/marriage/death */ 40bbb76c12SGreg Roach return I18N::translate('Vital records'); 410e62c4b8SGreg Roach } 420e62c4b8SGreg Roach 4376692c8bSGreg Roach /** 4476692c8bSGreg Roach * A sentence describing what this module does. 4576692c8bSGreg Roach * 4676692c8bSGreg Roach * @return string 4776692c8bSGreg Roach */ 4849a243cbSGreg Roach public function description(): string 49c1010edaSGreg Roach { 500e62c4b8SGreg Roach // This text also appears in the .XML file - update both together 51bbb76c12SGreg Roach /* I18N: Description of the “Vital records” module. “Vital records” are life events - birth/marriage/death */ 52bbb76c12SGreg Roach return I18N::translate('A report of vital records for a given date or place.'); 530e62c4b8SGreg Roach } 540e62c4b8SGreg Roach 5576692c8bSGreg Roach /** 560ee13198SGreg Roach * Return a menu item for this report. 5776692c8bSGreg Roach * 582c2c92e6SGreg Roach * @param Individual $individual 59962e29c9SGreg Roach * 600ee13198SGreg Roach * @return Menu 6176692c8bSGreg Roach */ 622c2c92e6SGreg Roach public function getReportMenu(Individual $individual): Menu 63c1010edaSGreg Roach { 640ee13198SGreg Roach return new Menu( 6549a243cbSGreg Roach $this->title(), 662c2c92e6SGreg Roach route('report-setup', [ 672c2c92e6SGreg Roach 'ged' => $individual->tree()->name(), 6826684e68SGreg Roach 'report' => $this->name(), 69c1010edaSGreg Roach ]), 7026684e68SGreg Roach 'menu-report-' . $this->name(), 7113abd6f3SGreg Roach ['rel' => 'nofollow'] 720e62c4b8SGreg Roach ); 730e62c4b8SGreg Roach } 740e62c4b8SGreg Roach} 75