xref: /webtrees/app/CustomTags/PersonalAncestralFile.php (revision d11be7027e34e3121be11cc025421873364403f9)
1<?php
2
3/**
4 * webtrees: online genealogy
5 * Copyright (C) 2023 webtrees development team
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17
18declare(strict_types=1);
19
20namespace Fisharebest\Webtrees\CustomTags;
21
22use Fisharebest\Webtrees\Contracts\CustomTagInterface;
23use Fisharebest\Webtrees\Contracts\ElementInterface;
24use Fisharebest\Webtrees\Elements\AddressCity;
25use Fisharebest\Webtrees\Elements\AddressCountry;
26use Fisharebest\Webtrees\Elements\AddressEmail;
27use Fisharebest\Webtrees\Elements\AddressFax;
28use Fisharebest\Webtrees\Elements\AddressLine;
29use Fisharebest\Webtrees\Elements\AddressLine1;
30use Fisharebest\Webtrees\Elements\AddressLine2;
31use Fisharebest\Webtrees\Elements\AddressPostalCode;
32use Fisharebest\Webtrees\Elements\AddressState;
33use Fisharebest\Webtrees\Elements\CustomElement;
34use Fisharebest\Webtrees\Elements\NamePersonal;
35use Fisharebest\Webtrees\Elements\PafUid;
36use Fisharebest\Webtrees\Elements\PhoneNumber;
37use Fisharebest\Webtrees\I18N;
38
39/**
40 * GEDCOM files created by Personal Ancestral File
41 */
42class PersonalAncestralFile implements CustomTagInterface
43{
44    /**
45     * The name of the application.
46     *
47     * @return string
48     */
49    public function name(): string
50    {
51        return 'Personal Ancestral File';
52    }
53
54    /**
55     * Tags created by this application.
56     *
57     * @return array<string,ElementInterface>
58     */
59    public function tags(): array
60    {
61        return [
62            'FAM:_UID'        => new PafUid(I18N::translate('Unique identifier')),
63            'INDI:NAME:_ADPN' => new NamePersonal(I18N::translate('Adopted name'), []),
64            'INDI:NAME:_AKA'  => new NamePersonal(I18N::translate('Also known as'), []),
65            'INDI:NAME:_AKAN' => new NamePersonal(I18N::translate('Also known as'), []),
66            'INDI:ADDR'       => new AddressLine(I18N::translate('Address')),
67            'INDI:ADDR:ADR1'  => new AddressLine1(I18N::translate('Address line 1')),
68            'INDI:ADDR:ADR2'  => new AddressLine2(I18N::translate('Address line 2')),
69            'INDI:ADDR:CITY'  => new AddressCity(I18N::translate('City')),
70            'INDI:ADDR:CTRY'  => new AddressCountry(I18N::translate('Country')),
71            'INDI:ADDR:POST'  => new AddressPostalCode(I18N::translate('Postal code')),
72            'INDI:ADDR:STAE'  => new AddressState(I18N::translate('State')),
73            'INDI:ADDR:_NAME' => new CustomElement(I18N::translate('Name of addressee')),
74            'INDI:EMAIL'      => new AddressEmail(I18N::translate('Email address')),
75            'INDI:FAX'        => new AddressFax(I18N::translate('Fax')),
76            'INDI:PHON'       => new PhoneNumber(I18N::translate('Phone')),
77            'INDI:URL'        => new CustomElement(I18N::translate('URL')),
78            'INDI:_UID'       => new PafUid(I18N::translate('Unique identifier')),
79            'OBJE:_UID'       => new PafUid(I18N::translate('Unique identifier')),
80            'REPO:_UID'       => new PafUid(I18N::translate('Unique identifier')),
81            'SOUR:_UID'       => new PafUid(I18N::translate('Unique identifier')),
82        ];
83    }
84}
85