xref: /webtrees/app/Module/BritishPrimeMinisters.php (revision 36779af1bd0601de7819554b13a393f6edb92507)
109fbf3e5SGreg Roach<?php
23976b470SGreg Roach
309fbf3e5SGreg Roach/**
409fbf3e5SGreg Roach * webtrees: online genealogy
589f7189bSGreg Roach * Copyright (C) 2021 webtrees development team
609fbf3e5SGreg Roach * This program is free software: you can redistribute it and/or modify
709fbf3e5SGreg Roach * it under the terms of the GNU General Public License as published by
809fbf3e5SGreg Roach * the Free Software Foundation, either version 3 of the License, or
909fbf3e5SGreg Roach * (at your option) any later version.
1009fbf3e5SGreg Roach * This program is distributed in the hope that it will be useful,
1109fbf3e5SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of
1209fbf3e5SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1309fbf3e5SGreg Roach * GNU General Public License for more details.
1409fbf3e5SGreg 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/>.
1609fbf3e5SGreg Roach */
17fcfa147eSGreg Roach
1809fbf3e5SGreg Roachdeclare(strict_types=1);
1909fbf3e5SGreg Roach
2009fbf3e5SGreg Roachnamespace Fisharebest\Webtrees\Module;
2109fbf3e5SGreg Roach
229429a0bfSGreg Roachuse Fisharebest\Webtrees\I18N;
2309fbf3e5SGreg Roachuse Illuminate\Support\Collection;
2409fbf3e5SGreg Roach
2509fbf3e5SGreg Roach/**
2609fbf3e5SGreg Roach * Class BritishPrimeMinisters
2709fbf3e5SGreg Roach */
2809fbf3e5SGreg Roachclass BritishPrimeMinisters extends AbstractModule implements ModuleHistoricEventsInterface
2909fbf3e5SGreg Roach{
3009fbf3e5SGreg Roach    use ModuleHistoricEventsTrait;
3109fbf3e5SGreg Roach
3209fbf3e5SGreg Roach    /**
330cfd6963SGreg Roach     * How should this module be identified in the control panel, etc.?
3409fbf3e5SGreg Roach     *
3509fbf3e5SGreg Roach     * @return string
3609fbf3e5SGreg Roach     */
3709fbf3e5SGreg Roach    public function title(): string
3809fbf3e5SGreg Roach    {
39fa24d895SGreg Roach        return 'British prime ministers ����';
4009fbf3e5SGreg Roach    }
4109fbf3e5SGreg Roach
4209fbf3e5SGreg Roach    /**
4309fbf3e5SGreg Roach     * Should this module be enabled when it is first installed?
4409fbf3e5SGreg Roach     *
4509fbf3e5SGreg Roach     * @return bool
4609fbf3e5SGreg Roach     */
4709fbf3e5SGreg Roach    public function isEnabledByDefault(): bool
4809fbf3e5SGreg Roach    {
4909fbf3e5SGreg Roach        return false;
5009fbf3e5SGreg Roach    }
5109fbf3e5SGreg Roach
5209fbf3e5SGreg Roach    /**
5309fbf3e5SGreg Roach     * All events provided by this module.
5409fbf3e5SGreg Roach     *
55*36779af1SGreg Roach     * @return Collection<int,string>
5609fbf3e5SGreg Roach     */
5709fbf3e5SGreg Roach    public function historicEventsAll(): Collection
5809fbf3e5SGreg Roach    {
599429a0bfSGreg Roach        switch (I18N::languageTag()) {
609429a0bfSGreg Roach            case 'en-AU':
619429a0bfSGreg Roach            case 'en-GB':
629429a0bfSGreg Roach            case 'en-US':
6309fbf3e5SGreg Roach                return new Collection([
646db73d03SDavid Drury                    "1 EVEN Robert Walpole\n2 TYPE Prime Minister of Great Britain\n2 DATE FROM 03 APR 1721 TO 16 FEB 1742",
656db73d03SDavid Drury                    "1 EVEN Spencer Compton\n2 TYPE Prime Minister of Great Britain\n2 DATE FROM 16 FEB 1742 TO 27 AUG 1743",
666db73d03SDavid Drury                    "1 EVEN Henry Pelham\n2 TYPE Prime Minister of Great Britain\n2 DATE FROM 27 AUG 1743 TO 16 MAR 1754",
676db73d03SDavid Drury                    "1 EVEN Thomas Pelham-Holles\n2 TYPE Prime Minister of Great Britain\n2 DATE FROM 16 MAR 1754 TO 16 NOV 1756",
686db73d03SDavid Drury                    "1 EVEN William Cavendish\n2 TYPE Prime Minister of Great Britain\n2 DATE FROM 16 NOV 1756 TO 29 JUN 1757",
696db73d03SDavid Drury                    "1 EVEN Thomas Pelham-Holles\n2 TYPE Prime Minister of Great Britain\n2 DATE FROM 29 JUN 1757 TO 26 MAY 1762",
706db73d03SDavid Drury                    "1 EVEN John Stuart\n2 TYPE Prime Minister of Great Britain\n2 DATE FROM 26 MAY 1762 TO 26 MAY 1762",
716db73d03SDavid Drury                    "1 EVEN George Grenville\n2 TYPE Prime Minister of Great Britain\n2 DATE FROM 26 MAY 1762 TO 13 JUL 1765",
726db73d03SDavid Drury                    "1 EVEN Charles Watson-Wentworth\n2 TYPE Prime Minister of Great Britain\n2 DATE FROM 13 JUL 1765 TO 30 JUL 1766",
736db73d03SDavid Drury                    "1 EVEN William Pitt\n2 TYPE Prime Minister of Great Britain\n2 DATE FROM 30 JUL 1766 TO 14 OCT 1768",
746db73d03SDavid Drury                    "1 EVEN Augustus FitzRoy\n2 TYPE Prime Minister of Great Britain\n2 DATE FROM 14 OCT 1768 TO 28 JAN 1770",
756db73d03SDavid Drury                    "1 EVEN Frederick North\n2 TYPE Prime Minister of Great Britain\n2 DATE FROM 28 JAN 1770 TO 27 MAR 1782",
766db73d03SDavid Drury                    "1 EVEN Charles Watson-Wentworth\n2 TYPE Prime Minister of Great Britain\n2 DATE FROM 27 MAR 1782 TO 04 JUL 1782",
776db73d03SDavid Drury                    "1 EVEN William Petty\n2 TYPE Prime Minister of Great Britain\n2 DATE FROM 04 JUL 1782 TO 02 APR 1783",
786db73d03SDavid Drury                    "1 EVEN William Cavendish-Bentinck\n2 TYPE Prime Minister of Great Britain\n2 DATE FROM 02 APR 1783 TO 19 DEC 1783",
79dc42ac50SGreg Roach                    "1 EVEN William Pitt the Younger\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 19 DEC 1783 TO 17 MAR 1801",
80dc42ac50SGreg Roach                    "1 EVEN Henry Addington\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 17 MAR 1801 TO 10 MAY 1804",
81dc42ac50SGreg Roach                    "1 EVEN William Pitt the Younger\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 10 MAY 1804 TO 11 FEB 1806",
82dc42ac50SGreg Roach                    "1 EVEN William Grenville\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 11 FEB 1806 TO 31 MAR 1807",
83dc42ac50SGreg Roach                    "1 EVEN William Cavendish-Bentinck\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 31 MAR 1807 TO 04 OCT 1809",
84dc42ac50SGreg Roach                    "1 EVEN Spencer Perceval\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 04 OCT 1809 TO 08 JUN 1812",
85dc42ac50SGreg Roach                    "1 EVEN Robert Jenkinson\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 08 JUN 1812 TO 12 APR 1827",
86dc42ac50SGreg Roach                    "1 EVEN George Canning\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 12 APR 1827 TO 31 AUG 1827",
87dc42ac50SGreg Roach                    "1 EVEN Frederick John Robinson\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 31 AUG 1827 TO 22 JAN 1828",
88dc42ac50SGreg Roach                    "1 EVEN Arthur Wellesley, Duke of Wellington\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 22 JAN 1828 TO 22 NOV 1830",
89dc42ac50SGreg Roach                    "1 EVEN Charles Grey\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 22 NOV 1830 TO 16 JUL 1834",
90dc42ac50SGreg Roach                    "1 EVEN William Lamb\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 16 JUL 1834 TO 17 NOV 1834",
91dc42ac50SGreg Roach                    "1 EVEN Arthur Wellesley, Duke of Wellington\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 17 NOV 1834 TO 10 DEC 1834",
92dc42ac50SGreg Roach                    "1 EVEN Robert Peel\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 10 DEC 1834 TO 18 APR 1835",
93dc42ac50SGreg Roach                    "1 EVEN William Lamb\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 18 APR 1835 TO 30 AUG 1841",
94dc42ac50SGreg Roach                    "1 EVEN Robert Peel\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 30 AUG 1841 TO 30 JUN 1846",
95dc42ac50SGreg Roach                    "1 EVEN John Russell\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 30 JUN 1846 TO 20 FEB 1852",
96dc42ac50SGreg Roach                    "1 EVEN Edward Smith-Stanley\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 20 FEB 1852 TO 19 DEC 1852",
97dc42ac50SGreg Roach                    "1 EVEN George Hamilton-Gordon\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 19 DEC 1852 TO 06 FEB 1855",
98dc42ac50SGreg Roach                    "1 EVEN Henry John Temple\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 06 FEB 1855 TO 20 FEB 1858",
99dc42ac50SGreg Roach                    "1 EVEN Edward Smith-Stanley\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 20 FEB 1858 TO 12 JUN 1859",
100dc42ac50SGreg Roach                    "1 EVEN Henry John Temple\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 12 JUN 1859 TO 29 OCT 1865",
101dc42ac50SGreg Roach                    "1 EVEN John Russell\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 29 OCT 1865 TO 28 JUN 1866",
102dc42ac50SGreg Roach                    "1 EVEN Edward Smith-Stanley\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 28 JUN 1866 TO 27 FEB 1868",
103dc42ac50SGreg Roach                    "1 EVEN Benjamin Disraeli\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 27 FEB 1868 TO 03 DEC 1868",
104dc42ac50SGreg Roach                    "1 EVEN William Ewart Gladstone\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 03 DEC 1868 TO 20 FEB 1874",
105dc42ac50SGreg Roach                    "1 EVEN Benjamin Disraeli\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 20 FEB 1874 TO 23 APR 1880",
106dc42ac50SGreg Roach                    "1 EVEN Robert Gascoyne-Cecil\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 23 APR 1880 TO 01 FEB 1886",
107dc42ac50SGreg Roach                    "1 EVEN William Ewart Gladstone\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 01 FEB 1886 TO 25 JUL 1886",
108dc42ac50SGreg Roach                    "1 EVEN Robert Gascoyne-Cecil\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 25 JUL 1886 TO 15 AUG 1892",
109dc42ac50SGreg Roach                    "1 EVEN William Ewart Gladstone\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 15 AUG 1892 TO 05 MAR 1894",
110dc42ac50SGreg Roach                    "1 EVEN Archibald Primrose\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 05 MAR 1894 TO 25 JUN 1895",
111dc42ac50SGreg Roach                    "1 EVEN Robert Gascoyne-Cecil\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 25 JUN 1895 TO 12 JUL 1902",
112dc42ac50SGreg Roach                    "1 EVEN Arthur Balfour\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 12 JUL 1902 TO 05 DEC 1905",
113dc42ac50SGreg Roach                    "1 EVEN Henry Campbell-Bannerman\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 05 DEC 1905 TO 05 APR 1908",
114dc42ac50SGreg Roach                    "1 EVEN Herbert Henry Asquith\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 05 APR 1908 TO 06 DEC 1916",
115dc42ac50SGreg Roach                    "1 EVEN David Lloyd George\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 06 DEC 1916 TO 23 OCT 1922",
116dc42ac50SGreg Roach                    "1 EVEN Bonar Law\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 23 OCT 1922 TO 22 MAY 1923",
117dc42ac50SGreg Roach                    "1 EVEN Stanley Baldwin\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 22 MAY 1923 TO 22 JAN 1924",
118dc42ac50SGreg Roach                    "1 EVEN Ramsey MacDonald\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 22 JAN 1924 TO 07 JUN 1935",
119dc42ac50SGreg Roach                    "1 EVEN Stanley Baldwin\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 07 JUN 1935 TO 28 MAY 1937",
120dc42ac50SGreg Roach                    "1 EVEN Neville Chamberlain\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 28 MAY 1937 TO 10 MAY 1940",
121dc42ac50SGreg Roach                    "1 EVEN Winston Churchill\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 10 MAY 1940 TO 26 JUL 1945",
122dc42ac50SGreg Roach                    "1 EVEN Clement Atlee\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 26 JUL 1945 TO 26 OCT 1951",
123dc42ac50SGreg Roach                    "1 EVEN Winston Churchill\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 26 OCT 1951 TO 06 APR 1955",
124dc42ac50SGreg Roach                    "1 EVEN Anthony Eden\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 06 APR 1955 TO 10 JAN 1957",
125dc42ac50SGreg Roach                    "1 EVEN Harold Macmillan\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 10 JAN 1957 TO 19 OCT 1963",
126dc42ac50SGreg Roach                    "1 EVEN Alex Douglas-Home\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 19 OCT 1963 TO 16 OCT 1964",
127dc42ac50SGreg Roach                    "1 EVEN Harold Wilson\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 16 OCT 1964 TO 19 JUN 1970",
128dc42ac50SGreg Roach                    "1 EVEN Edward Heath\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 19 JUN 1970 TO 04 MAR 1974",
129dc42ac50SGreg Roach                    "1 EVEN Harold Wilson\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 04 MAR 1974 TO 05 APR 1976",
130dc42ac50SGreg Roach                    "1 EVEN James Callaghan\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 05 APR 1976 TO 04 MAY 1979",
131dc42ac50SGreg Roach                    "1 EVEN Margaret Thatcher\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 04 MAY 1979 TO 28 NOV 1990",
132dc42ac50SGreg Roach                    "1 EVEN John Major\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 28 NOV 1990 TO 02 MAY 1997",
133dc42ac50SGreg Roach                    "1 EVEN Tony Blair\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 02 MAY 1997 TO 27 JUN 2007",
134dc42ac50SGreg Roach                    "1 EVEN Gordon Brown\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 27 JUN 2007 TO 11 MAY 2010",
135dc42ac50SGreg Roach                    "1 EVEN David Cameron\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 11 MAY 2010 TO 13 JUL 2016",
136dc42ac50SGreg Roach                    "1 EVEN Theresa May\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 13 JUL 2016 TO 24 JUL 2019",
137dc42ac50SGreg Roach                    "1 EVEN Boris Johnson\n2 TYPE Prime Minister of the United Kingdom\n2 DATE FROM 24 JUL 2019",
13809fbf3e5SGreg Roach                ]);
1399429a0bfSGreg Roach
1409429a0bfSGreg Roach            default:
1419429a0bfSGreg Roach                return new Collection();
1429429a0bfSGreg Roach        }
14309fbf3e5SGreg Roach    }
14409fbf3e5SGreg Roach}
145