diff options
| author | Greg Roach <fisharebest@gmail.com> | 2015-05-31 08:08:54 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2015-05-31 17:36:14 +0100 |
| commit | 0e62c4b8d0ec6901bfaffd1dc763db37489518a4 (patch) | |
| tree | a1949cbb3ba5e7cf7d5ab8b08a4f179857328625 /app/Module/BirthDeathMarriageReportModule.php | |
| parent | 5bccd64ef5cfe5e079d2cd516f4a661881dbe46c (diff) | |
| download | webtrees-0e62c4b8d0ec6901bfaffd1dc763db37489518a4.tar.gz webtrees-0e62c4b8d0ec6901bfaffd1dc763db37489518a4.tar.bz2 webtrees-0e62c4b8d0ec6901bfaffd1dc763db37489518a4.zip | |
PSR-4
Diffstat (limited to 'app/Module/BirthDeathMarriageReportModule.php')
| -rw-r--r-- | app/Module/BirthDeathMarriageReportModule.php | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/app/Module/BirthDeathMarriageReportModule.php b/app/Module/BirthDeathMarriageReportModule.php new file mode 100644 index 0000000000..970b030697 --- /dev/null +++ b/app/Module/BirthDeathMarriageReportModule.php @@ -0,0 +1,57 @@ +<?php +namespace Fisharebest\Webtrees\Module; + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +use Fisharebest\Webtrees\Auth; +use Fisharebest\Webtrees\I18N; +use Fisharebest\Webtrees\Menu; + +/** + * Class BirthDeathMarriageReportModule + */ +class BirthDeathMarriageReportModule extends AbstractModule implements ModuleReportInterface { + /** {@inheritdoc} */ + public function getTitle() { + // This text also appears in the .XML file - update both together + return /* I18N: Name of a module/report. “Vital records” are life events - birth/marriage/death */ I18N::translate('Vital records'); + } + + /** {@inheritdoc} */ + public function getDescription() { + // This text also appears in the .XML file - update both together + 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.'); + } + + /** {@inheritdoc} */ + public function defaultAccessLevel() { + return Auth::PRIV_PRIVATE; + } + + /** {@inheritdoc} */ + public function getReportMenus() { + global $WT_TREE; + + $menus = array(); + $menu = new Menu( + $this->getTitle(), + 'reportengine.php?ged=' . $WT_TREE->getNameUrl() . '&action=setup&report=' . WT_MODULES_DIR . $this->getName() . '/report.xml', + 'menu-report-' . $this->getName() + ); + $menus[] = $menu; + + return $menus; + } +} |
