xref: /webtrees/app/CustomTags/PhpGedView.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\AddressWebPage;
25use Fisharebest\Webtrees\Elements\CustomElement;
26use Fisharebest\Webtrees\Elements\CustomIndividualEvent;
27use Fisharebest\Webtrees\Elements\NamePersonal;
28use Fisharebest\Webtrees\Elements\NoteStructure;
29use Fisharebest\Webtrees\Elements\RelationIsDescriptor;
30use Fisharebest\Webtrees\Elements\RestrictionNotice;
31use Fisharebest\Webtrees\Elements\WebtreesUser;
32use Fisharebest\Webtrees\Elements\XrefAssociate;
33use Fisharebest\Webtrees\Elements\XrefMedia;
34use Fisharebest\Webtrees\I18N;
35
36/**
37 * GEDCOM files created by phpGedView
38 *
39 * @see http://www.phpgedview.net
40 */
41class PhpGedView implements CustomTagInterface
42{
43    /**
44     * The name of the application.
45     *
46     * @return string
47     */
48    public function name(): string
49    {
50        return 'phpGedView';
51    }
52
53    /**
54     * Tags created by this application.
55     *
56     * @return array<string,ElementInterface>
57     */
58    public function tags(): array
59    {
60        return [
61            'FAM:CHAN:_PGVU'        => new WebtreesUser(I18N::translate('Author of last change')),
62            'FAM:COMM'              => new CustomElement(I18N::translate('Comment')),
63            'INDI:*:ASSO'           => new XrefAssociate(I18N::translate('Associate')),
64            'INDI:*:ASSO:RELA'      => new RelationIsDescriptor(I18N::translate('Relationship')),
65            'INDI:*:PLAC:_HEB'      => new NoteStructure(I18N::translate('Place in Hebrew')),
66            'INDI:BURI:CEME'        => new CustomElement(I18N::translate('Cemetery')),
67            'INDI:CHAN:_PGVU'       => new WebtreesUser(I18N::translate('Author of last change')),
68            'INDI:COMM'             => new CustomElement(I18N::translate('Comment')),
69            'INDI:NAME:_HEB'        => new NamePersonal(I18N::translate('Name in Hebrew'), []),
70            'INDI:_HOL'             => new CustomIndividualEvent(I18N::translate('Holocaust')),
71            'INDI:_PGV_OBJS'        => new XrefMedia(I18N::translate('Re-order media')),
72            'NOTE:CHAN:_PGVU'       => new WebtreesUser(I18N::translate('Author of last change')),
73            'OBJE:CHAN:_PGVU'       => new WebtreesUser(I18N::translate('Author of last change')),
74            'OBJE:_THUM'            => new CustomElement(I18N::translate('Thumbnail image')),
75            'REPO:CHAN:_PGVU'       => new WebtreesUser(I18N::translate('Author of last change')),
76            'SOUR:CHAN:_PGVU'       => new WebtreesUser(I18N::translate('Author of last change')),
77            'SOUR:SERV'             => new CustomElement(I18N::translate('Remote server')),
78            'SOUR:URL'              => new AddressWebPage(I18N::translate('URL')),
79            'SOUR:URL:TYPE'         => new CustomElement(I18N::translate('Type')), // e.g. "FamilySearch"
80            'SOUR:URL:_BLOCK'       => new CustomElement(I18N::translate('Block')), // "e.g. "false"
81            'SOUR:_DBID'            => new CustomElement(I18N::translate('Database name')),
82            'SOUR:_DBID:_PASS'      => new CustomElement(I18N::translate('Database password')),
83            'SOUR:_DBID:_PASS:RESN' => new RestrictionNotice(I18N::translate('Restriction')),
84            'SOUR:_DBID:_USER'      => new CustomElement(I18N::translate('Database user account')),
85        ];
86    }
87}
88