1e7e5b015SGreg Roach<?php 2e7e5b015SGreg Roach 3e7e5b015SGreg Roach/** 4e7e5b015SGreg Roach * webtrees: online genealogy 55bfc6897SGreg Roach * Copyright (C) 2022 webtrees development team 6e7e5b015SGreg Roach * This program is free software: you can redistribute it and/or modify 7e7e5b015SGreg Roach * it under the terms of the GNU General Public License as published by 8e7e5b015SGreg Roach * the Free Software Foundation, either version 3 of the License, or 9e7e5b015SGreg Roach * (at your option) any later version. 10e7e5b015SGreg Roach * This program is distributed in the hope that it will be useful, 11e7e5b015SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of 12e7e5b015SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13e7e5b015SGreg Roach * GNU General Public License for more details. 14e7e5b015SGreg Roach * You should have received a copy of the GNU General Public License 15e7e5b015SGreg Roach * along with this program. If not, see <https://www.gnu.org/licenses/>. 16e7e5b015SGreg Roach */ 17e7e5b015SGreg Roach 18e7e5b015SGreg Roachdeclare(strict_types=1); 19e7e5b015SGreg Roach 20e7e5b015SGreg Roachnamespace Fisharebest\Webtrees\Elements; 21e7e5b015SGreg Roach 22*34c26284SGreg Roachuse Fisharebest\Webtrees\Site; 23*34c26284SGreg Roach 24e7e5b015SGreg Roach/** 25e7e5b015SGreg Roach * A level 0 family record 26e7e5b015SGreg Roach */ 27e7e5b015SGreg Roachclass FamilyRecord extends AbstractElement 28e7e5b015SGreg Roach{ 29e7e5b015SGreg Roach protected const SUBTAGS = [ 309c7bc1e3SGreg Roach 'ANUL' => '0:M', 319c7bc1e3SGreg Roach 'CENS' => '0:M', 32afc27317SGreg Roach 'CHAN' => '0:1', 339c7bc1e3SGreg Roach 'CHIL' => '0:M', 349c7bc1e3SGreg Roach 'DIV' => '0:M', 359c7bc1e3SGreg Roach 'DIVF' => '0:M', 369c7bc1e3SGreg Roach 'ENGA' => '0:M', 379c7bc1e3SGreg Roach 'EVEN' => '0:M', 389c7bc1e3SGreg Roach 'HUSB' => '0:1', 399c7bc1e3SGreg Roach 'MARB' => '0:M', 409c7bc1e3SGreg Roach 'MARC' => '0:M', 419c7bc1e3SGreg Roach 'MARL' => '0:M', 429c7bc1e3SGreg Roach 'MARR' => '0:M', 439c7bc1e3SGreg Roach 'MARS' => '0:M', 449c7bc1e3SGreg Roach 'NCHI' => '0:1', 459c7bc1e3SGreg Roach 'NOTE' => '0:M', 469c7bc1e3SGreg Roach 'OBJE' => '0:M', 479c7bc1e3SGreg Roach 'REFN' => '0:M', 489c7bc1e3SGreg Roach 'RESI' => '0:M', 499c7bc1e3SGreg Roach 'RESN' => '0:1', 509c7bc1e3SGreg Roach 'RIN' => '0:1', 519c7bc1e3SGreg Roach 'SLGS' => '0:M', 529c7bc1e3SGreg Roach 'SOUR' => '0:M', 539c7bc1e3SGreg Roach 'SUBM' => '0:M', 549c7bc1e3SGreg Roach 'WIFE' => '0:1', 55e7e5b015SGreg Roach ]; 56*34c26284SGreg Roach 57*34c26284SGreg Roach /** 58*34c26284SGreg Roach * @return array<string,string> 59*34c26284SGreg Roach */ 60*34c26284SGreg Roach public function subtags(): array 61*34c26284SGreg Roach { 62*34c26284SGreg Roach $subtags = parent::subtags(); 63*34c26284SGreg Roach 64*34c26284SGreg Roach if (Site::getPreference('HIDE_FAM_RESI') === '1') { 65*34c26284SGreg Roach unset($subtags['RESI']); 66*34c26284SGreg Roach } 67*34c26284SGreg Roach 68*34c26284SGreg Roach if (Site::getPreference('HIDE_FAM_CENS') === '1') { 69*34c26284SGreg Roach unset($subtags['CENS']); 70*34c26284SGreg Roach } 71*34c26284SGreg Roach 72*34c26284SGreg Roach return $subtags; 73*34c26284SGreg Roach } 74e7e5b015SGreg Roach} 75