xref: /webtrees/app/Module/AustrianPresidents.php (revision 3ee4c7ef16663dd8419c69876f7c40ed549d5490)
13b387b05SGreg Roach<?php
23b387b05SGreg Roach
33b387b05SGreg Roach/**
43b387b05SGreg Roach * webtrees: online genealogy
5d11be702SGreg Roach * Copyright (C) 2023 webtrees development team
63b387b05SGreg Roach * This program is free software: you can redistribute it and/or modify
73b387b05SGreg Roach * it under the terms of the GNU General Public License as published by
83b387b05SGreg Roach * the Free Software Foundation, either version 3 of the License, or
93b387b05SGreg Roach * (at your option) any later version.
103b387b05SGreg Roach * This program is distributed in the hope that it will be useful,
113b387b05SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of
123b387b05SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
133b387b05SGreg Roach * GNU General Public License for more details.
143b387b05SGreg Roach * You should have received a copy of the GNU General Public License
1589f7189bSGreg Roach * along with this program. If not, see <https://www.gnu.org/licenses/>.
163b387b05SGreg Roach */
173b387b05SGreg Roach
183b387b05SGreg Roachdeclare(strict_types=1);
193b387b05SGreg Roach
203b387b05SGreg Roachnamespace Fisharebest\Webtrees\Module;
213b387b05SGreg Roach
229429a0bfSGreg Roachuse Fisharebest\Webtrees\I18N;
233b387b05SGreg Roachuse Illuminate\Support\Collection;
243b387b05SGreg Roach
253b387b05SGreg Roach/**
263b387b05SGreg Roach * Class AustrianPresidents
273b387b05SGreg Roach */
283b387b05SGreg Roachclass AustrianPresidents extends AbstractModule implements ModuleHistoricEventsInterface
293b387b05SGreg Roach{
303b387b05SGreg Roach    use ModuleHistoricEventsTrait;
313b387b05SGreg Roach
323b387b05SGreg Roach    /**
333b387b05SGreg Roach     * How should this module be identified in the control panel, etc.?
343b387b05SGreg Roach     *
353b387b05SGreg Roach     * @return string
363b387b05SGreg Roach     */
373b387b05SGreg Roach    public function title(): string
383b387b05SGreg Roach    {
39fa24d895SGreg Roach        return 'Bundespräsidenten Österreichs ����';
403b387b05SGreg Roach    }
413b387b05SGreg Roach
423b387b05SGreg Roach    /**
433b387b05SGreg Roach     * Should this module be enabled when it is first installed?
443b387b05SGreg Roach     *
453b387b05SGreg Roach     * @return bool
463b387b05SGreg Roach     */
473b387b05SGreg Roach    public function isEnabledByDefault(): bool
483b387b05SGreg Roach    {
493b387b05SGreg Roach        return false;
503b387b05SGreg Roach    }
513b387b05SGreg Roach
523b387b05SGreg Roach    /**
5336779af1SGreg Roach     * @return Collection<int,string>
543b387b05SGreg Roach     */
55*3ee4c7efSGreg Roach    public function historicEventsAll(string $language_tag): Collection
563b387b05SGreg Roach    {
57*3ee4c7efSGreg Roach        switch ($language_tag) {
589429a0bfSGreg Roach            case 'de':
593b387b05SGreg Roach                return new Collection([
603b387b05SGreg Roach                    "1 EVEN Karl Seitz\n2 TYPE Präsident des Staatsdirektoriums\n2 DATE FROM 30 OCT 1918 TO 09 DEC 1920",
613b387b05SGreg Roach                    "1 EVEN Michael Hainisch\n2 TYPE Bundespräsident\n2 DATE FROM 09 DEC 1920 TO 10 DEC 1928",
623b387b05SGreg Roach                    "1 EVEN Wilhelm Miklas\n2 TYPE Bundespräsident\n2 DATE FROM 10 DEC 1928 TO 12 MAR 1938",
633b387b05SGreg Roach                    "1 EVEN Karl Renner\n2 TYPE Bundespräsident\n2 DATE FROM 20 DEC 1945 TO 31 DEC 1950",
643b387b05SGreg Roach                    "1 EVEN Theodor Körner\n2 TYPE Bundespräsident\n2 DATE FROM 21 JUN 1951 TO 04 JAN 1957",
653b387b05SGreg Roach                    "1 EVEN Adolf Schärf\n2 TYPE Bundespräsident\n2 DATE FROM 22 MAY 1957 TO 28 FEB 1965",
663b387b05SGreg Roach                    "1 EVEN Franz Jonas\n2 TYPE Bundespräsident\n2 DATE FROM 09 JUN 1965 TO 24 APR 1974",
673b387b05SGreg Roach                    "1 EVEN Rudolf Kirchschläger\n2 TYPE Bundespräsident\n2 DATE FROM 08 JUL 1974 TO 08 JUL 1986",
683b387b05SGreg Roach                    "1 EVEN Kurt Waldheim\n2 TYPE Bundespräsident\n2 DATE FROM 08 JUL 1986 TO 08 JUL 1992",
693b387b05SGreg Roach                    "1 EVEN Thomas Klestil\n2 TYPE Bundespräsident\n2 DATE FROM 08 JUL 1992 TO 06 JUL 2004",
703b387b05SGreg Roach                    "1 EVEN Heinz Fischer\n2 TYPE Bundespräsident\n2 DATE FROM 08 JUL 2004 TO 08 JUL 2016",
713b387b05SGreg Roach                    "1 EVEN Alexander Van der Bellen\n2 TYPE Bundespräsident\n2 DATE FROM 26 JAN 2017",
723b387b05SGreg Roach                ]);
739429a0bfSGreg Roach
749429a0bfSGreg Roach            default:
759429a0bfSGreg Roach                return new Collection();
769429a0bfSGreg Roach        }
773b387b05SGreg Roach    }
783b387b05SGreg Roach}
79