13763c3f2SGreg Roach<?php 23763c3f2SGreg Roach/** 33763c3f2SGreg Roach * webtrees: online genealogy 41062a142SGreg Roach * Copyright (C) 2018 webtrees development team 53763c3f2SGreg Roach * This program is free software: you can redistribute it and/or modify 63763c3f2SGreg Roach * it under the terms of the GNU General Public License as published by 73763c3f2SGreg Roach * the Free Software Foundation, either version 3 of the License, or 83763c3f2SGreg Roach * (at your option) any later version. 93763c3f2SGreg Roach * This program is distributed in the hope that it will be useful, 103763c3f2SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of 113763c3f2SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 123763c3f2SGreg Roach * GNU General Public License for more details. 133763c3f2SGreg Roach * You should have received a copy of the GNU General Public License 143763c3f2SGreg Roach * along with this program. If not, see <http://www.gnu.org/licenses/>. 153763c3f2SGreg Roach */ 1676692c8bSGreg Roachnamespace Fisharebest\Webtrees\Module; 1776692c8bSGreg Roach 180e62c4b8SGreg Roachuse Fisharebest\Webtrees\Auth; 190e62c4b8SGreg Roachuse Fisharebest\Webtrees\I18N; 200e62c4b8SGreg Roachuse Fisharebest\Webtrees\Menu; 21*dc809433SGreg Roachuse Fisharebest\Webtrees\Tree; 223763c3f2SGreg Roach 233763c3f2SGreg Roach/** 243763c3f2SGreg Roach * Class MissingFactsReportModule 253763c3f2SGreg Roach */ 26e2a378d3SGreg Roachclass MissingFactsReportModule extends AbstractModule implements ModuleReportInterface { 273763c3f2SGreg Roach /** {@inheritdoc} */ 283763c3f2SGreg Roach public function getTitle() { 293763c3f2SGreg Roach // This text also appears in the .XML file - update both together 303763c3f2SGreg Roach return /* I18N: Name of a module/report */ I18N::translate('Missing data'); 313763c3f2SGreg Roach } 323763c3f2SGreg Roach 333763c3f2SGreg Roach /** {@inheritdoc} */ 343763c3f2SGreg Roach public function getDescription() { 353763c3f2SGreg Roach // This text also appears in the .XML file - update both together 363763c3f2SGreg Roach return /* I18N: Description of the “Missing data” */ I18N::translate('A report of the information that is missing for an individual and their relatives.'); 373763c3f2SGreg Roach } 383763c3f2SGreg Roach 390ee13198SGreg Roach /** 400ee13198SGreg Roach * What is the default access level for this module? 410ee13198SGreg Roach * 420ee13198SGreg Roach * Some modules are aimed at admins or managers, and are not generally shown to users. 430ee13198SGreg Roach * 440ee13198SGreg Roach * @return int 450ee13198SGreg Roach */ 463763c3f2SGreg Roach public function defaultAccessLevel() { 473763c3f2SGreg Roach return Auth::PRIV_USER; 483763c3f2SGreg Roach } 493763c3f2SGreg Roach 500ee13198SGreg Roach /** 510ee13198SGreg Roach * Return a menu item for this report. 520ee13198SGreg Roach * 53*dc809433SGreg Roach * @param Tree $tree 54*dc809433SGreg Roach * 550ee13198SGreg Roach * @return Menu 560ee13198SGreg Roach */ 57*dc809433SGreg Roach public function getReportMenu(Tree $tree): Menu { 580ee13198SGreg Roach return new Menu( 593763c3f2SGreg Roach $this->getTitle(), 60*dc809433SGreg Roach e(route('report-setup', ['ged' => $tree->getName(), 'report' => $this->getName()])), 610ee13198SGreg Roach 'menu-report-' . $this->getName(), 6213abd6f3SGreg Roach ['rel' => 'nofollow'] 633763c3f2SGreg Roach ); 643763c3f2SGreg Roach } 653763c3f2SGreg Roach} 66