xref: /webtrees/app/Http/Routes/WebRoutes.php (revision ac701fbd36864ec7630310142b9b16f78934a505)
1<?php
2
3/**
4 * webtrees: online genealogy
5 * Copyright (C) 2021 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\Http\Routes;
21
22use Aura\Router\Map;
23use Fig\Http\Message\RequestMethodInterface;
24use Fisharebest\Webtrees\Http\Middleware\AuthAdministrator;
25use Fisharebest\Webtrees\Http\Middleware\AuthEditor;
26use Fisharebest\Webtrees\Http\Middleware\AuthLoggedIn;
27use Fisharebest\Webtrees\Http\Middleware\AuthManager;
28use Fisharebest\Webtrees\Http\Middleware\AuthModerator;
29use Fisharebest\Webtrees\Http\RequestHandlers\AccountDelete;
30use Fisharebest\Webtrees\Http\RequestHandlers\AccountEdit;
31use Fisharebest\Webtrees\Http\RequestHandlers\AccountUpdate;
32use Fisharebest\Webtrees\Http\RequestHandlers\AddChildToFamilyAction;
33use Fisharebest\Webtrees\Http\RequestHandlers\AddChildToFamilyPage;
34use Fisharebest\Webtrees\Http\RequestHandlers\AddChildToIndividualAction;
35use Fisharebest\Webtrees\Http\RequestHandlers\AddChildToIndividualPage;
36use Fisharebest\Webtrees\Http\RequestHandlers\AddMediaFileAction;
37use Fisharebest\Webtrees\Http\RequestHandlers\AddMediaFileModal;
38use Fisharebest\Webtrees\Http\RequestHandlers\AddNewFact;
39use Fisharebest\Webtrees\Http\RequestHandlers\AddParentToIndividualAction;
40use Fisharebest\Webtrees\Http\RequestHandlers\AddParentToIndividualPage;
41use Fisharebest\Webtrees\Http\RequestHandlers\AddSpouseToFamilyAction;
42use Fisharebest\Webtrees\Http\RequestHandlers\AddSpouseToFamilyPage;
43use Fisharebest\Webtrees\Http\RequestHandlers\AddSpouseToIndividualAction;
44use Fisharebest\Webtrees\Http\RequestHandlers\AddSpouseToIndividualPage;
45use Fisharebest\Webtrees\Http\RequestHandlers\AddUnlinkedAction;
46use Fisharebest\Webtrees\Http\RequestHandlers\AddUnlinkedPage;
47use Fisharebest\Webtrees\Http\RequestHandlers\AdminMediaFileDownload;
48use Fisharebest\Webtrees\Http\RequestHandlers\AdminMediaFileThumbnail;
49use Fisharebest\Webtrees\Http\RequestHandlers\AppleTouchIconPng;
50use Fisharebest\Webtrees\Http\RequestHandlers\AutoCompleteCitation;
51use Fisharebest\Webtrees\Http\RequestHandlers\AutoCompleteFolder;
52use Fisharebest\Webtrees\Http\RequestHandlers\AutoCompletePlace;
53use Fisharebest\Webtrees\Http\RequestHandlers\AutoCompleteSurname;
54use Fisharebest\Webtrees\Http\RequestHandlers\BroadcastAction;
55use Fisharebest\Webtrees\Http\RequestHandlers\BroadcastPage;
56use Fisharebest\Webtrees\Http\RequestHandlers\BrowserconfigXml;
57use Fisharebest\Webtrees\Http\RequestHandlers\CalendarAction;
58use Fisharebest\Webtrees\Http\RequestHandlers\CalendarEvents;
59use Fisharebest\Webtrees\Http\RequestHandlers\CalendarPage;
60use Fisharebest\Webtrees\Http\RequestHandlers\ChangeFamilyMembersAction;
61use Fisharebest\Webtrees\Http\RequestHandlers\ChangeFamilyMembersPage;
62use Fisharebest\Webtrees\Http\RequestHandlers\CheckTree;
63use Fisharebest\Webtrees\Http\RequestHandlers\CleanDataFolder;
64use Fisharebest\Webtrees\Http\RequestHandlers\ContactAction;
65use Fisharebest\Webtrees\Http\RequestHandlers\ContactPage;
66use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
67use Fisharebest\Webtrees\Http\RequestHandlers\CopyFact;
68use Fisharebest\Webtrees\Http\RequestHandlers\CreateLocationAction;
69use Fisharebest\Webtrees\Http\RequestHandlers\CreateLocationModal;
70use Fisharebest\Webtrees\Http\RequestHandlers\CreateMediaObjectAction;
71use Fisharebest\Webtrees\Http\RequestHandlers\CreateMediaObjectFromFile;
72use Fisharebest\Webtrees\Http\RequestHandlers\CreateMediaObjectModal;
73use Fisharebest\Webtrees\Http\RequestHandlers\CreateNoteAction;
74use Fisharebest\Webtrees\Http\RequestHandlers\CreateNoteModal;
75use Fisharebest\Webtrees\Http\RequestHandlers\CreateRepositoryAction;
76use Fisharebest\Webtrees\Http\RequestHandlers\CreateRepositoryModal;
77use Fisharebest\Webtrees\Http\RequestHandlers\CreateSourceAction;
78use Fisharebest\Webtrees\Http\RequestHandlers\CreateSourceModal;
79use Fisharebest\Webtrees\Http\RequestHandlers\CreateSubmissionAction;
80use Fisharebest\Webtrees\Http\RequestHandlers\CreateSubmissionModal;
81use Fisharebest\Webtrees\Http\RequestHandlers\CreateSubmitterAction;
82use Fisharebest\Webtrees\Http\RequestHandlers\CreateSubmitterModal;
83use Fisharebest\Webtrees\Http\RequestHandlers\CreateTreeAction;
84use Fisharebest\Webtrees\Http\RequestHandlers\CreateTreePage;
85use Fisharebest\Webtrees\Http\RequestHandlers\DataFixChoose;
86use Fisharebest\Webtrees\Http\RequestHandlers\DataFixData;
87use Fisharebest\Webtrees\Http\RequestHandlers\DataFixPage;
88use Fisharebest\Webtrees\Http\RequestHandlers\DataFixPreview;
89use Fisharebest\Webtrees\Http\RequestHandlers\DataFixSelect;
90use Fisharebest\Webtrees\Http\RequestHandlers\DataFixUpdate;
91use Fisharebest\Webtrees\Http\RequestHandlers\DataFixUpdateAll;
92use Fisharebest\Webtrees\Http\RequestHandlers\DeleteFact;
93use Fisharebest\Webtrees\Http\RequestHandlers\DeletePath;
94use Fisharebest\Webtrees\Http\RequestHandlers\DeleteRecord;
95use Fisharebest\Webtrees\Http\RequestHandlers\DeleteTreeAction;
96use Fisharebest\Webtrees\Http\RequestHandlers\DeleteUser;
97use Fisharebest\Webtrees\Http\RequestHandlers\EditFactAction;
98use Fisharebest\Webtrees\Http\RequestHandlers\EditFactPage;
99use Fisharebest\Webtrees\Http\RequestHandlers\EditMediaFileAction;
100use Fisharebest\Webtrees\Http\RequestHandlers\EditMediaFileModal;
101use Fisharebest\Webtrees\Http\RequestHandlers\EditNoteAction;
102use Fisharebest\Webtrees\Http\RequestHandlers\EditNotePage;
103use Fisharebest\Webtrees\Http\RequestHandlers\EditRawFactAction;
104use Fisharebest\Webtrees\Http\RequestHandlers\EditRawFactPage;
105use Fisharebest\Webtrees\Http\RequestHandlers\EditRawRecordAction;
106use Fisharebest\Webtrees\Http\RequestHandlers\EditRawRecordPage;
107use Fisharebest\Webtrees\Http\RequestHandlers\EditRecordAction;
108use Fisharebest\Webtrees\Http\RequestHandlers\EditRecordPage;
109use Fisharebest\Webtrees\Http\RequestHandlers\EmailPreferencesAction;
110use Fisharebest\Webtrees\Http\RequestHandlers\EmailPreferencesPage;
111use Fisharebest\Webtrees\Http\RequestHandlers\EmptyClipboard;
112use Fisharebest\Webtrees\Http\RequestHandlers\ExportGedcomClient;
113use Fisharebest\Webtrees\Http\RequestHandlers\ExportGedcomPage;
114use Fisharebest\Webtrees\Http\RequestHandlers\ExportGedcomServer;
115use Fisharebest\Webtrees\Http\RequestHandlers\FamilyPage;
116use Fisharebest\Webtrees\Http\RequestHandlers\FaviconIco;
117use Fisharebest\Webtrees\Http\RequestHandlers\FindDuplicateRecords;
118use Fisharebest\Webtrees\Http\RequestHandlers\FixLevel0MediaAction;
119use Fisharebest\Webtrees\Http\RequestHandlers\FixLevel0MediaData;
120use Fisharebest\Webtrees\Http\RequestHandlers\FixLevel0MediaPage;
121use Fisharebest\Webtrees\Http\RequestHandlers\GedcomLoad;
122use Fisharebest\Webtrees\Http\RequestHandlers\GedcomRecordPage;
123use Fisharebest\Webtrees\Http\RequestHandlers\HeaderPage;
124use Fisharebest\Webtrees\Http\RequestHandlers\HelpText;
125use Fisharebest\Webtrees\Http\RequestHandlers\HomePage;
126use Fisharebest\Webtrees\Http\RequestHandlers\ImportGedcomAction;
127use Fisharebest\Webtrees\Http\RequestHandlers\ImportGedcomPage;
128use Fisharebest\Webtrees\Http\RequestHandlers\ImportThumbnailsAction;
129use Fisharebest\Webtrees\Http\RequestHandlers\ImportThumbnailsData;
130use Fisharebest\Webtrees\Http\RequestHandlers\ImportThumbnailsPage;
131use Fisharebest\Webtrees\Http\RequestHandlers\IndividualPage;
132use Fisharebest\Webtrees\Http\RequestHandlers\LinkChildToFamilyAction;
133use Fisharebest\Webtrees\Http\RequestHandlers\LinkChildToFamilyPage;
134use Fisharebest\Webtrees\Http\RequestHandlers\LinkMediaToFamilyModal;
135use Fisharebest\Webtrees\Http\RequestHandlers\LinkMediaToIndividualModal;
136use Fisharebest\Webtrees\Http\RequestHandlers\LinkMediaToRecordAction;
137use Fisharebest\Webtrees\Http\RequestHandlers\LinkMediaToSourceModal;
138use Fisharebest\Webtrees\Http\RequestHandlers\LinkSpouseToIndividualAction;
139use Fisharebest\Webtrees\Http\RequestHandlers\LinkSpouseToIndividualPage;
140use Fisharebest\Webtrees\Http\RequestHandlers\LocationPage;
141use Fisharebest\Webtrees\Http\RequestHandlers\LoginAction;
142use Fisharebest\Webtrees\Http\RequestHandlers\LoginPage;
143use Fisharebest\Webtrees\Http\RequestHandlers\Logout;
144use Fisharebest\Webtrees\Http\RequestHandlers\ManageMediaAction;
145use Fisharebest\Webtrees\Http\RequestHandlers\ManageMediaData;
146use Fisharebest\Webtrees\Http\RequestHandlers\ManageMediaPage;
147use Fisharebest\Webtrees\Http\RequestHandlers\ManageTrees;
148use Fisharebest\Webtrees\Http\RequestHandlers\MapDataAdd;
149use Fisharebest\Webtrees\Http\RequestHandlers\MapDataDelete;
150use Fisharebest\Webtrees\Http\RequestHandlers\MapDataEdit;
151use Fisharebest\Webtrees\Http\RequestHandlers\MapDataExportCSV;
152use Fisharebest\Webtrees\Http\RequestHandlers\MapDataExportGeoJson;
153use Fisharebest\Webtrees\Http\RequestHandlers\MapDataImportAction;
154use Fisharebest\Webtrees\Http\RequestHandlers\MapDataImportPage;
155use Fisharebest\Webtrees\Http\RequestHandlers\MapDataList;
156use Fisharebest\Webtrees\Http\RequestHandlers\MapDataSave;
157use Fisharebest\Webtrees\Http\RequestHandlers\Masquerade;
158use Fisharebest\Webtrees\Http\RequestHandlers\MediaFileDownload;
159use Fisharebest\Webtrees\Http\RequestHandlers\MediaFileThumbnail;
160use Fisharebest\Webtrees\Http\RequestHandlers\MediaPage;
161use Fisharebest\Webtrees\Http\RequestHandlers\MergeFactsAction;
162use Fisharebest\Webtrees\Http\RequestHandlers\MergeFactsPage;
163use Fisharebest\Webtrees\Http\RequestHandlers\MergeRecordsAction;
164use Fisharebest\Webtrees\Http\RequestHandlers\MergeRecordsPage;
165use Fisharebest\Webtrees\Http\RequestHandlers\MergeTreesAction;
166use Fisharebest\Webtrees\Http\RequestHandlers\MergeTreesPage;
167use Fisharebest\Webtrees\Http\RequestHandlers\MessageAction;
168use Fisharebest\Webtrees\Http\RequestHandlers\MessagePage;
169use Fisharebest\Webtrees\Http\RequestHandlers\MessageSelect;
170use Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction;
171use Fisharebest\Webtrees\Http\RequestHandlers\ModuleDeleteSettings;
172use Fisharebest\Webtrees\Http\RequestHandlers\ModulesAllAction;
173use Fisharebest\Webtrees\Http\RequestHandlers\ModulesAllPage;
174use Fisharebest\Webtrees\Http\RequestHandlers\ModulesAnalyticsAction;
175use Fisharebest\Webtrees\Http\RequestHandlers\ModulesAnalyticsPage;
176use Fisharebest\Webtrees\Http\RequestHandlers\ModulesBlocksAction;
177use Fisharebest\Webtrees\Http\RequestHandlers\ModulesBlocksPage;
178use Fisharebest\Webtrees\Http\RequestHandlers\ModulesChartsAction;
179use Fisharebest\Webtrees\Http\RequestHandlers\ModulesChartsPage;
180use Fisharebest\Webtrees\Http\RequestHandlers\ModulesCustomTagsAction;
181use Fisharebest\Webtrees\Http\RequestHandlers\ModulesCustomTagsPage;
182use Fisharebest\Webtrees\Http\RequestHandlers\ModulesDataFixesAction;
183use Fisharebest\Webtrees\Http\RequestHandlers\ModulesDataFixesPage;
184use Fisharebest\Webtrees\Http\RequestHandlers\ModulesFootersAction;
185use Fisharebest\Webtrees\Http\RequestHandlers\ModulesFootersPage;
186use Fisharebest\Webtrees\Http\RequestHandlers\ModulesHistoricEventsAction;
187use Fisharebest\Webtrees\Http\RequestHandlers\ModulesHistoricEventsPage;
188use Fisharebest\Webtrees\Http\RequestHandlers\ModulesLanguagesAction;
189use Fisharebest\Webtrees\Http\RequestHandlers\ModulesLanguagesPage;
190use Fisharebest\Webtrees\Http\RequestHandlers\ModulesListsAction;
191use Fisharebest\Webtrees\Http\RequestHandlers\ModulesListsPage;
192use Fisharebest\Webtrees\Http\RequestHandlers\ModulesMapAutocompleteAction;
193use Fisharebest\Webtrees\Http\RequestHandlers\ModulesMapAutocompletePage;
194use Fisharebest\Webtrees\Http\RequestHandlers\ModulesMapLinksAction;
195use Fisharebest\Webtrees\Http\RequestHandlers\ModulesMapLinksPage;
196use Fisharebest\Webtrees\Http\RequestHandlers\ModulesMapProvidersAction;
197use Fisharebest\Webtrees\Http\RequestHandlers\ModulesMapProvidersPage;
198use Fisharebest\Webtrees\Http\RequestHandlers\ModulesMapGeoLocationsAction;
199use Fisharebest\Webtrees\Http\RequestHandlers\ModulesMapGeoLocationsPage;
200use Fisharebest\Webtrees\Http\RequestHandlers\ModulesMenusAction;
201use Fisharebest\Webtrees\Http\RequestHandlers\ModulesMenusPage;
202use Fisharebest\Webtrees\Http\RequestHandlers\ModulesReportsAction;
203use Fisharebest\Webtrees\Http\RequestHandlers\ModulesReportsPage;
204use Fisharebest\Webtrees\Http\RequestHandlers\ModulesSharesAction;
205use Fisharebest\Webtrees\Http\RequestHandlers\ModulesSharesPage;
206use Fisharebest\Webtrees\Http\RequestHandlers\ModulesSidebarsAction;
207use Fisharebest\Webtrees\Http\RequestHandlers\ModulesSidebarsPage;
208use Fisharebest\Webtrees\Http\RequestHandlers\ModulesTabsAction;
209use Fisharebest\Webtrees\Http\RequestHandlers\ModulesTabsPage;
210use Fisharebest\Webtrees\Http\RequestHandlers\ModulesThemesAction;
211use Fisharebest\Webtrees\Http\RequestHandlers\ModulesThemesPage;
212use Fisharebest\Webtrees\Http\RequestHandlers\NotePage;
213use Fisharebest\Webtrees\Http\RequestHandlers\PasswordRequestAction;
214use Fisharebest\Webtrees\Http\RequestHandlers\PasswordRequestPage;
215use Fisharebest\Webtrees\Http\RequestHandlers\PasswordResetAction;
216use Fisharebest\Webtrees\Http\RequestHandlers\PasswordResetPage;
217use Fisharebest\Webtrees\Http\RequestHandlers\PasteFact;
218use Fisharebest\Webtrees\Http\RequestHandlers\PendingChanges;
219use Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesAcceptChange;
220use Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesAcceptRecord;
221use Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesAcceptTree;
222use Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesLogAction;
223use Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesLogData;
224use Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesLogDelete;
225use Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesLogDownload;
226use Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesLogPage;
227use Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesRejectChange;
228use Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesRejectRecord;
229use Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesRejectTree;
230use Fisharebest\Webtrees\Http\RequestHandlers\PhpInformation;
231use Fisharebest\Webtrees\Http\RequestHandlers\Ping;
232use Fisharebest\Webtrees\Http\RequestHandlers\RegisterAction;
233use Fisharebest\Webtrees\Http\RequestHandlers\RegisterPage;
234use Fisharebest\Webtrees\Http\RequestHandlers\RenumberTreeAction;
235use Fisharebest\Webtrees\Http\RequestHandlers\RenumberTreePage;
236use Fisharebest\Webtrees\Http\RequestHandlers\ReorderChildrenAction;
237use Fisharebest\Webtrees\Http\RequestHandlers\ReorderChildrenPage;
238use Fisharebest\Webtrees\Http\RequestHandlers\ReorderFamiliesAction;
239use Fisharebest\Webtrees\Http\RequestHandlers\ReorderFamiliesPage;
240use Fisharebest\Webtrees\Http\RequestHandlers\ReorderMediaAction;
241use Fisharebest\Webtrees\Http\RequestHandlers\ReorderMediaPage;
242use Fisharebest\Webtrees\Http\RequestHandlers\ReorderNamesAction;
243use Fisharebest\Webtrees\Http\RequestHandlers\ReorderNamesPage;
244use Fisharebest\Webtrees\Http\RequestHandlers\ReportGenerate;
245use Fisharebest\Webtrees\Http\RequestHandlers\ReportListAction;
246use Fisharebest\Webtrees\Http\RequestHandlers\ReportListPage;
247use Fisharebest\Webtrees\Http\RequestHandlers\ReportSetupAction;
248use Fisharebest\Webtrees\Http\RequestHandlers\ReportSetupPage;
249use Fisharebest\Webtrees\Http\RequestHandlers\RepositoryPage;
250use Fisharebest\Webtrees\Http\RequestHandlers\RobotsTxt;
251use Fisharebest\Webtrees\Http\RequestHandlers\SearchAdvancedAction;
252use Fisharebest\Webtrees\Http\RequestHandlers\SearchAdvancedPage;
253use Fisharebest\Webtrees\Http\RequestHandlers\SearchGeneralAction;
254use Fisharebest\Webtrees\Http\RequestHandlers\SearchGeneralPage;
255use Fisharebest\Webtrees\Http\RequestHandlers\SearchPhoneticAction;
256use Fisharebest\Webtrees\Http\RequestHandlers\SearchPhoneticPage;
257use Fisharebest\Webtrees\Http\RequestHandlers\SearchQuickAction;
258use Fisharebest\Webtrees\Http\RequestHandlers\SearchReplaceAction;
259use Fisharebest\Webtrees\Http\RequestHandlers\SearchReplacePage;
260use Fisharebest\Webtrees\Http\RequestHandlers\Select2Family;
261use Fisharebest\Webtrees\Http\RequestHandlers\Select2Individual;
262use Fisharebest\Webtrees\Http\RequestHandlers\Select2Location;
263use Fisharebest\Webtrees\Http\RequestHandlers\Select2MediaObject;
264use Fisharebest\Webtrees\Http\RequestHandlers\Select2Note;
265use Fisharebest\Webtrees\Http\RequestHandlers\Select2Place;
266use Fisharebest\Webtrees\Http\RequestHandlers\Select2Repository;
267use Fisharebest\Webtrees\Http\RequestHandlers\Select2Source;
268use Fisharebest\Webtrees\Http\RequestHandlers\Select2Submission;
269use Fisharebest\Webtrees\Http\RequestHandlers\Select2Submitter;
270use Fisharebest\Webtrees\Http\RequestHandlers\SelectDefaultTree;
271use Fisharebest\Webtrees\Http\RequestHandlers\SelectLanguage;
272use Fisharebest\Webtrees\Http\RequestHandlers\SelectNewFact;
273use Fisharebest\Webtrees\Http\RequestHandlers\SelectTheme;
274use Fisharebest\Webtrees\Http\RequestHandlers\SiteLogsAction;
275use Fisharebest\Webtrees\Http\RequestHandlers\SiteLogsData;
276use Fisharebest\Webtrees\Http\RequestHandlers\SiteLogsDelete;
277use Fisharebest\Webtrees\Http\RequestHandlers\SiteLogsDownload;
278use Fisharebest\Webtrees\Http\RequestHandlers\SiteLogsPage;
279use Fisharebest\Webtrees\Http\RequestHandlers\SitePreferencesAction;
280use Fisharebest\Webtrees\Http\RequestHandlers\SitePreferencesPage;
281use Fisharebest\Webtrees\Http\RequestHandlers\SiteRegistrationAction;
282use Fisharebest\Webtrees\Http\RequestHandlers\SiteRegistrationPage;
283use Fisharebest\Webtrees\Http\RequestHandlers\SourcePage;
284use Fisharebest\Webtrees\Http\RequestHandlers\SubmissionPage;
285use Fisharebest\Webtrees\Http\RequestHandlers\SubmitterPage;
286use Fisharebest\Webtrees\Http\RequestHandlers\SynchronizeTrees;
287use Fisharebest\Webtrees\Http\RequestHandlers\TreePage;
288use Fisharebest\Webtrees\Http\RequestHandlers\TreePageBlock;
289use Fisharebest\Webtrees\Http\RequestHandlers\TreePageBlockEdit;
290use Fisharebest\Webtrees\Http\RequestHandlers\TreePageBlockUpdate;
291use Fisharebest\Webtrees\Http\RequestHandlers\TreePageDefaultEdit;
292use Fisharebest\Webtrees\Http\RequestHandlers\TreePageDefaultUpdate;
293use Fisharebest\Webtrees\Http\RequestHandlers\TreePageEdit;
294use Fisharebest\Webtrees\Http\RequestHandlers\TreePageUpdate;
295use Fisharebest\Webtrees\Http\RequestHandlers\TreePreferencesAction;
296use Fisharebest\Webtrees\Http\RequestHandlers\TreePreferencesPage;
297use Fisharebest\Webtrees\Http\RequestHandlers\TreePrivacyAction;
298use Fisharebest\Webtrees\Http\RequestHandlers\TreePrivacyPage;
299use Fisharebest\Webtrees\Http\RequestHandlers\SiteTagsAction;
300use Fisharebest\Webtrees\Http\RequestHandlers\SiteTagsPage;
301use Fisharebest\Webtrees\Http\RequestHandlers\UnconnectedAction;
302use Fisharebest\Webtrees\Http\RequestHandlers\UnconnectedPage;
303use Fisharebest\Webtrees\Http\RequestHandlers\UpgradeWizardConfirm;
304use Fisharebest\Webtrees\Http\RequestHandlers\UpgradeWizardPage;
305use Fisharebest\Webtrees\Http\RequestHandlers\UpgradeWizardStep;
306use Fisharebest\Webtrees\Http\RequestHandlers\UploadMediaAction;
307use Fisharebest\Webtrees\Http\RequestHandlers\UploadMediaPage;
308use Fisharebest\Webtrees\Http\RequestHandlers\UserAddAction;
309use Fisharebest\Webtrees\Http\RequestHandlers\UserAddPage;
310use Fisharebest\Webtrees\Http\RequestHandlers\UserEditAction;
311use Fisharebest\Webtrees\Http\RequestHandlers\UserEditPage;
312use Fisharebest\Webtrees\Http\RequestHandlers\UserListData;
313use Fisharebest\Webtrees\Http\RequestHandlers\UserListPage;
314use Fisharebest\Webtrees\Http\RequestHandlers\UserPage;
315use Fisharebest\Webtrees\Http\RequestHandlers\UserPageBlock;
316use Fisharebest\Webtrees\Http\RequestHandlers\UserPageBlockEdit;
317use Fisharebest\Webtrees\Http\RequestHandlers\UserPageBlockUpdate;
318use Fisharebest\Webtrees\Http\RequestHandlers\UserPageDefaultEdit;
319use Fisharebest\Webtrees\Http\RequestHandlers\UserPageDefaultUpdate;
320use Fisharebest\Webtrees\Http\RequestHandlers\UserPageEdit;
321use Fisharebest\Webtrees\Http\RequestHandlers\UserPageUpdate;
322use Fisharebest\Webtrees\Http\RequestHandlers\UsersCleanupAction;
323use Fisharebest\Webtrees\Http\RequestHandlers\UsersCleanupPage;
324use Fisharebest\Webtrees\Http\RequestHandlers\VerifyEmail;
325use Fisharebest\Webtrees\Http\RequestHandlers\WebmanifestJson;
326
327/**
328 * Routing table for web requests
329 */
330class WebRoutes
331{
332    /**
333     * @param Map $router
334     *
335     * @return void
336     */
337    public function load(Map $router): void
338    {
339        $router->attach('', '', static function (Map $router) {
340            // Admin routes.
341            $router->attach('', '/admin', static function (Map $router) {
342                $router->extras([
343                    'middleware' => [
344                        AuthAdministrator::class,
345                    ],
346                ]);
347
348                $router->get(ControlPanel::class, '');
349                $router->get(BroadcastPage::class, '/broadcast');
350                $router->post(BroadcastAction::class, '/broadcast');
351                $router->get(CleanDataFolder::class, '/clean');
352                $router->post(DeletePath::class, '/delete-path');
353                $router->get(EmailPreferencesPage::class, '/email');
354                $router->post(EmailPreferencesAction::class, '/email');
355                $router->get(FixLevel0MediaPage::class, '/fix-level-0-media');
356                $router->post(FixLevel0MediaAction::class, '/fix-level-0-media');
357                $router->get(FixLevel0MediaData::class, '/fix-level-0-media-data');
358                $router->get(PhpInformation::class, '/information');
359                $router->get(SiteLogsPage::class, '/logs');
360                $router->post(SiteLogsAction::class, '/logs');
361                $router->get(SiteLogsData::class, '/logs-data');
362                $router->post(SiteLogsDelete::class, '/logs-delete');
363                $router->get(SiteLogsDownload::class, '/logs-download');
364                $router->post(Masquerade::class, '/masquerade/{user_id}');
365                $router->get(ManageMediaPage::class, '/media');
366                $router->post(ManageMediaAction::class, '/media');
367                $router->get(ManageMediaData::class, '/media-data');
368                $router->get(UploadMediaPage::class, '/media-upload');
369                $router->post(UploadMediaAction::class, '/media-upload');
370                $router->get(AdminMediaFileDownload::class, '/media-file');
371                $router->get(AdminMediaFileThumbnail::class, '/media-thumbnail');
372                $router->get(CreateTreePage::class, '/trees/create');
373                $router->post(CreateTreeAction::class, '/trees/create');
374                $router->post(SelectDefaultTree::class, '/trees/default/{tree}');
375                $router->post(DeleteTreeAction::class, '/trees/delete/{tree}');
376                $router->get(ImportThumbnailsPage::class, '/webtrees1-thumbs');
377                $router->post(ImportThumbnailsAction::class, '/webtrees1-thumbs');
378                $router->get(ImportThumbnailsData::class, '/webtrees1-thumbs-data');
379                $router->get(UsersCleanupPage::class, '/users-cleanup');
380                $router->post(UsersCleanupAction::class, '/users-cleanup');
381                $router->get(MapDataAdd::class, '/map-data-add{/parent_id}');
382                $router->post(MapDataDelete::class, '/map-data-delete/{place_id}');
383                $router->get(MapDataEdit::class, '/map-data-edit/{place_id}');
384                $router->get(MapDataExportCSV::class, '/map-data-csv{/parent_id}');
385                $router->get(MapDataExportGeoJson::class, '/map-data-geojson{/parent_id}');
386                $router->get(MapDataImportPage::class, '/locations-import');
387                $router->post(MapDataImportAction::class, '/locations-import');
388                $router->get(MapDataList::class, '/map-data{/parent_id}');
389                $router->post(MapDataSave::class, '/map-data-update');
390                $router->post(ModuleDeleteSettings::class, '/module-delete-settings');
391                $router->get(ModulesAllPage::class, '/modules');
392                $router->post(ModulesAllAction::class, '/modules');
393                $router->get(ModulesAnalyticsPage::class, '/analytics');
394                $router->post(ModulesAnalyticsAction::class, '/analytics');
395                $router->get(ModulesBlocksPage::class, '/blocks');
396                $router->post(ModulesBlocksAction::class, '/blocks');
397                $router->get(ModulesChartsPage::class, '/charts');
398                $router->post(ModulesChartsAction::class, '/charts');
399                $router->get(ModulesCustomTagsPage::class, '/custom-tags');
400                $router->post(ModulesCustomTagsAction::class, '/custom-tags');
401                $router->get(ModulesDataFixesPage::class, '/data-fixes');
402                $router->post(ModulesDataFixesAction::class, '/data-fixes');
403                $router->get(ModulesFootersPage::class, '/footers');
404                $router->post(ModulesFootersAction::class, '/footers');
405                $router->get(ModulesHistoricEventsPage::class, '/historic-events');
406                $router->post(ModulesHistoricEventsAction::class, '/historic-events');
407                $router->get(ModulesListsPage::class, '/lists');
408                $router->post(ModulesListsAction::class, '/lists');
409                $router->get(ModulesMapAutocompletePage::class, '/map-autocomplete');
410                $router->post(ModulesMapAutocompleteAction::class, '/map-autocomplete');
411                $router->get(ModulesMapLinksPage::class, '/map-links');
412                $router->post(ModulesMapLinksAction::class, '/map-links');
413                $router->get(ModulesMapProvidersPage::class, '/map-providers');
414                $router->post(ModulesMapProvidersAction::class, '/map-providers');
415                $router->get(ModulesMapGeoLocationsPage::class, '/map-searches');
416                $router->post(ModulesMapGeoLocationsAction::class, '/map-searches');
417                $router->get(ModulesMenusPage::class, '/menus');
418                $router->post(ModulesMenusAction::class, '/menus');
419                $router->get(ModulesLanguagesPage::class, '/languages');
420                $router->post(ModulesLanguagesAction::class, '/languages');
421                $router->get(ModulesReportsPage::class, '/reports');
422                $router->post(ModulesReportsAction::class, '/reports');
423                $router->get(ModulesSharesPage::class, '/shares');
424                $router->post(ModulesSharesAction::class, '/shares');
425                $router->get(ModulesSidebarsPage::class, '/sidebars');
426                $router->post(ModulesSidebarsAction::class, '/sidebars');
427                $router->get(ModulesTabsPage::class, '/tabs');
428                $router->post(ModulesTabsAction::class, '/tabs');
429                $router->get(ModulesThemesPage::class, '/themes');
430                $router->post(ModulesThemesAction::class, '/themes');
431                $router->get(UpgradeWizardPage::class, '/upgrade');
432                $router->post(UpgradeWizardConfirm::class, '/upgrade-confirm');
433                $router->post(UpgradeWizardStep::class, '/upgrade-action');
434                $router->get(UserListPage::class, '/admin-users');
435                $router->get(UserListData::class, '/admin-users-data');
436                $router->get(UserAddPage::class, '/admin-users-create');
437                $router->post(UserAddAction::class, '/admin-users-create');
438                $router->get(UserEditPage::class, '/admin-users-edit');
439                $router->post(UserEditAction::class, '/admin-users-edit');
440                $router->get(SitePreferencesPage::class, '/site-preferences');
441                $router->post(SitePreferencesAction::class, '/site-preferences');
442                $router->get(SiteRegistrationPage::class, '/site-registration');
443                $router->post(SiteRegistrationAction::class, '/site-registration');
444                $router->get(SiteTagsPage::class, '/tags');
445                $router->post(SiteTagsAction::class, '/tags');
446                $router->get(TreePageDefaultEdit::class, '/trees/default-blocks');
447                $router->post(TreePageDefaultUpdate::class, '/trees/default-blocks');
448                $router->get(MergeTreesPage::class, '/trees/merge');
449                $router->post(MergeTreesAction::class, '/trees/merge');
450                $router->post(SynchronizeTrees::class, '/trees/sync');
451                $router->post(DeleteUser::class, '/users/delete/{user_id}');
452                $router->get(UserPageDefaultEdit::class, '/user-page-default-edit');
453                $router->post(UserPageDefaultUpdate::class, '/user-page-default-update');
454            });
455
456            // Manager routes (multiple trees).
457            $router->attach('', '/admin', static function (Map $router) {
458                $router->extras([
459                    'middleware' => [
460                        AuthManager::class,
461                    ],
462                ]);
463
464                $router->get(ManageTrees::class, '/trees/manage/{tree}');
465            });
466
467            // Manager routes.
468            $router->attach('', '/tree/{tree}', static function (Map $router) {
469                $router->extras([
470                    'middleware' => [
471                        AuthManager::class,
472                    ],
473                ]);
474
475                $router->get(PendingChangesLogPage::class, '/changes-log');
476                $router->post(PendingChangesLogAction::class, '/changes-log');
477                $router->get(PendingChangesLogData::class, '/changes-data');
478                $router->post(PendingChangesLogDelete::class, '/changes-delete');
479                $router->get(PendingChangesLogDownload::class, '/changes-download');
480                $router->get(CheckTree::class, '/check');
481                $router->get(DataFixChoose::class, '/data-fix');
482                $router->post(DataFixSelect::class, '/data-fix');
483                $router->get(DataFixPage::class, '/data-fix/{data_fix}');
484                $router->post(DataFixUpdate::class, '/data-fix/{data_fix}/update');
485                $router->post(DataFixUpdateAll::class, '/data-fix/{data_fix}/update-all');
486                $router->get(DataFixData::class, '/data-fix/{data_fix}/data');
487                $router->get(DataFixPreview::class, '/data-fix/{data_fix}/preview');
488                $router->get(FindDuplicateRecords::class, '/duplicates');
489                $router->get(ExportGedcomPage::class, '/export');
490                $router->post(ExportGedcomClient::class, '/export-client');
491                $router->post(ExportGedcomServer::class, '/export-server');
492                $router->get(ImportGedcomPage::class, '/import');
493                $router->post(ImportGedcomAction::class, '/import');
494                $router->get(MergeRecordsPage::class, '/merge-step1');
495                $router->post(MergeRecordsAction::class, '/merge-step1');
496                $router->get(MergeFactsPage::class, '/merge-step2');
497                $router->post(MergeFactsAction::class, '/merge-step2');
498                $router->get(TreePreferencesPage::class, '/preferences');
499                $router->post(TreePreferencesAction::class, '/preferences');
500                $router->get(RenumberTreePage::class, '/renumber');
501                $router->post(RenumberTreeAction::class, '/renumber');
502                $router->get(TreePageEdit::class, '/tree-page-edit');
503                $router->post(GedcomLoad::class, '/load');
504                $router->post(TreePageUpdate::class, '/tree-page-update');
505                $router->get(TreePageBlockEdit::class, '/tree-page-block-edit');
506                $router->post(TreePageBlockUpdate::class, '/tree-page-block-edit');
507                $router->get(TreePrivacyPage::class, '/privacy');
508                $router->post(TreePrivacyAction::class, '/privacy');
509                $router->get(UnconnectedPage::class, '/unconnected');
510                $router->post(UnconnectedAction::class, '/unconnected');
511            });
512
513            // Moderator routes.
514            $router->attach('', '/tree/{tree}', static function (Map $router) {
515                $router->extras([
516                    'middleware' => [
517                        AuthModerator::class,
518                    ],
519                ]);
520                $router->post(PendingChangesAcceptTree::class, '/accept');
521                $router->post(PendingChangesAcceptRecord::class, '/accept/{xref}');
522                $router->post(PendingChangesAcceptChange::class, '/accept/{xref}/{change}');
523                $router->get(PendingChanges::class, '/pending');
524                $router->post(PendingChangesRejectTree::class, '/reject');
525                $router->post(PendingChangesRejectRecord::class, '/reject/{xref}');
526                $router->post(PendingChangesRejectChange::class, '/reject/{xref}/{change}');
527            });
528
529            // Editor routes.
530            $router->attach('', '/tree/{tree}', static function (Map $router) {
531                $router->extras([
532                    'middleware' => [
533                        AuthEditor::class,
534                    ],
535                ]);
536
537                $router->get(AutoCompleteCitation::class, '/autocomplete/citation');
538                $router->get(AutoCompleteFolder::class, '/autocomplete/folder');
539                $router->get(AutoCompletePlace::class, '/autocomplete/place');
540                $router->get(AutoCompleteSurname::class, '/autocomplete/surname');
541                $router->get(AddChildToFamilyPage::class, '/add-child-to-family/{xref}/{sex}');
542                $router->post(AddChildToFamilyAction::class, '/add-child-to-family/{xref}');
543                $router->get(AddNewFact::class, '/add-fact/{xref}/{fact}');
544                $router->post(SelectNewFact::class, '/add-fact/{xref}');
545                $router->get(AddMediaFileModal::class, '/add-media-file/{xref}');
546                $router->post(AddMediaFileAction::class, '/add-media-file/{xref}');
547                $router->get(AddSpouseToFamilyPage::class, '/add-spouse-to-family/{xref}/{sex}');
548                $router->post(AddSpouseToFamilyAction::class, '/add-spouse-to-family/{xref}');
549                $router->get(ChangeFamilyMembersPage::class, '/change-family-members');
550                $router->post(ChangeFamilyMembersAction::class, '/change-family-members');
551                $router->get(CreateLocationModal::class, '/create-location');
552                $router->post(CreateLocationAction::class, '/create-location');
553                $router->get(CreateMediaObjectModal::class, '/create-media-object');
554                $router->post(CreateMediaObjectAction::class, '/create-media-object');
555                $router->post(CreateMediaObjectFromFile::class, '/create-media-from-file');
556                $router->post(CopyFact::class, '/copy/{xref}/{fact_id}');
557                $router->get(CreateNoteModal::class, '/create-note-object');
558                $router->post(CreateNoteAction::class, '/create-note-object');
559                $router->get(CreateRepositoryModal::class, '/create-repository');
560                $router->post(CreateRepositoryAction::class, '/create-repository');
561                $router->get(CreateSourceModal::class, '/create-source');
562                $router->post(CreateSourceAction::class, '/create-source');
563                $router->get(CreateSubmitterModal::class, '/create-submitter');
564                $router->post(CreateSubmitterAction::class, '/create-submitter');
565                $router->get(CreateSubmissionModal::class, '/create-submission');
566                $router->post(CreateSubmissionAction::class, '/create-submission');
567                $router->post(DeleteRecord::class, '/delete/{xref}');
568                $router->post(DeleteFact::class, '/delete/{xref}/{fact_id}');
569                $router->get(EditFactPage::class, '/edit-fact/{xref}/{fact_id}');
570                $router->post(EditFactAction::class, '/update-fact/{xref}{/fact_id}');
571                $router->get(EditMediaFileModal::class, '/edit-media-file/{xref}/{fact_id}');
572                $router->post(EditMediaFileAction::class, '/edit-media-file/{xref}/{fact_id}');
573                $router->get(EditNotePage::class, '/edit-note-object/{xref}');
574                $router->post(EditNoteAction::class, '/edit-note-object/{xref}');
575                $router->get(EditRawFactPage::class, '/edit-raw/{xref}/{fact_id}');
576                $router->post(EditRawFactAction::class, '/edit-raw/{xref}/{fact_id}');
577                $router->get(EditRawRecordPage::class, '/edit-raw/{xref}');
578                $router->post(EditRawRecordAction::class, '/edit-raw/{xref}');
579                $router->get(LinkMediaToFamilyModal::class, '/link-media-to-family/{xref}');
580                $router->get(LinkMediaToIndividualModal::class, '/link-media-to-individual/{xref}');
581                $router->get(LinkMediaToSourceModal::class, '/link-media-to-source/{xref}');
582                $router->post(LinkMediaToRecordAction::class, '/link-media-to-record/{xref}');
583                $router->get(EditRecordPage::class, '/edit-record/{xref}');
584                $router->post(EditRecordAction::class, '/update-record/{xref}');
585                $router->post(PasteFact::class, '/paste-fact/{xref}');
586                $router->get(ReorderChildrenPage::class, '/reorder-children/{xref}');
587                $router->post(ReorderChildrenAction::class, '/reorder-children/{xref}');
588                $router->get(ReorderMediaPage::class, '/reorder-media/{xref}');
589                $router->post(ReorderMediaAction::class, '/reorder-media/{xref}');
590                $router->get(ReorderNamesPage::class, '/reorder-names/{xref}');
591                $router->post(ReorderNamesAction::class, '/reorder-names/{xref}');
592                $router->get(ReorderFamiliesPage::class, '/reorder-spouses/{xref}');
593                $router->post(ReorderFamiliesAction::class, '/reorder-spouses/{xref}');
594                $router->get(SearchReplacePage::class, '/search-replace');
595                $router->post(SearchReplaceAction::class, '/search-replace');
596                $router->get(AddChildToIndividualPage::class, '/add-child-to-individual/{xref}');
597                $router->post(AddChildToIndividualAction::class, '/add-child-to-individual/{xref}');
598                $router->get(AddParentToIndividualPage::class, '/add-parent-to-individual/{xref}/{sex}');
599                $router->post(AddParentToIndividualAction::class, '/add-parent-to-individual/{xref}');
600                $router->get(AddSpouseToIndividualPage::class, '/add-spouse-to-individual/{xref}');
601                $router->post(AddSpouseToIndividualAction::class, '/add-spouse-to-individual/{xref}');
602                $router->get(AddUnlinkedPage::class, '/add-unlinked-individual');
603                $router->post(AddUnlinkedAction::class, '/add-unlinked-individual');
604                $router->get(LinkChildToFamilyPage::class, '/link-child-to-family/{xref}');
605                $router->post(LinkChildToFamilyAction::class, '/link-child-to-family/{xref}');
606                $router->get(LinkSpouseToIndividualPage::class, '/link-spouse-to-individual/{xref}');
607                $router->post(LinkSpouseToIndividualAction::class, '/link-spouse-to-individual/{xref}');
608            });
609
610            // User routes with a tree.
611            $router->attach('', '/tree/{tree}', static function (Map $router) {
612                $router->extras([
613                    'middleware' => [
614                        AuthLoggedIn::class,
615                    ],
616                ]);
617
618                $router->post(MessageSelect::class, '/message-select');
619                $router->get(MessagePage::class, '/message-compose');
620                $router->post(MessageAction::class, '/message-send');
621                $router->get(UserPage::class, '/my-page');
622                $router->get(UserPageBlock::class, '/my-page-block');
623                $router->get(UserPageEdit::class, '/my-page-edit');
624                $router->post(UserPageUpdate::class, '/my-page-edit');
625                $router->get(UserPageBlockEdit::class, '/my-page-block-edit');
626                $router->post(UserPageBlockUpdate::class, '/my-page-block-edit');
627            });
628
629            // User routes without a tree.
630            $router->attach('', '', static function (Map $router) {
631                $router->extras([
632                    'middleware' => [
633                        AuthLoggedIn::class,
634                    ],
635                ]);
636
637                $router->get(AccountEdit::class, '/my-account{/tree}');
638                $router->post(AccountUpdate::class, '/my-account{/tree}');
639                $router->post(AccountDelete::class, '/my-account-delete');
640                $router->post(EmptyClipboard::class, '/empty-clipboard');
641            });
642
643            // Visitor routes - with an optional tree (for sites with no public trees).
644            $router->attach('', '', static function (Map $router) {
645                $router->get(LoginPage::class, '/login{/tree}');
646                $router->post(LoginAction::class, '/login{/tree}');
647                $router->get(PasswordRequestPage::class, '/password-request{/tree}');
648                $router->post(PasswordRequestAction::class, '/password-request{/tree}');
649                $router->get(RegisterPage::class, '/register{/tree}');
650                $router->post(RegisterAction::class, '/register{/tree}');
651                $router->get(PasswordResetPage::class, '/password-reset/{token}{/tree}');
652                $router->post(PasswordResetAction::class, '/password-reset/{token}{/tree}');
653                $router->get(VerifyEmail::class, '/verify/{username}/{token}{/tree}');
654            });
655
656            // Visitor routes with a tree.
657            $router->attach('', '/tree/{tree}', static function (Map $router) {
658                $router->get(TreePage::class, '');
659                $router->get(CalendarPage::class, '/calendar/{view}');
660                $router->post(CalendarAction::class, '/calendar/{view}');
661                $router->get(CalendarEvents::class, '/calendar-events/{view}');
662                $router->get(ContactPage::class, '/contact');
663                $router->post(ContactAction::class, '/contact');
664                $router->get(FamilyPage::class, '/family/{xref}{/slug}');
665                $router->get(HeaderPage::class, '/header/{xref}{/slug}');
666                $router->get(IndividualPage::class, '/individual/{xref}{/slug}');
667                $router->get(LocationPage::class, '/location/{xref}{/slug}');
668                $router->get(MediaFileThumbnail::class, '/media-thumbnail');
669                $router->get(MediaFileDownload::class, '/media-download');
670                $router->get(MediaPage::class, '/media/{xref}{/slug}');
671                $router->get(NotePage::class, '/note/{xref}{/slug}');
672                $router->get(GedcomRecordPage::class, '/record/{xref}{/slug}');
673                $router->get(RepositoryPage::class, '/repository/{xref}{/slug}');
674                $router->get(ReportListPage::class, '/report');
675                $router->post(ReportListAction::class, '/report');
676                $router->get(ReportSetupPage::class, '/report/{report}');
677                $router->post(ReportSetupAction::class, '/report/{report}');
678                $router->get(ReportGenerate::class, '/report-run/{report}');
679                $router->get(SearchAdvancedPage::class, '/search-advanced');
680                $router->post(SearchAdvancedAction::class, '/search-advanced');
681                $router->get(SearchGeneralPage::class, '/search-general');
682                $router->post(SearchGeneralAction::class, '/search-general');
683                $router->get(SearchPhoneticPage::class, '/search-phonetic');
684                $router->post(SearchPhoneticAction::class, '/search-phonetic');
685                $router->post(SearchQuickAction::class, '/search-quick');
686                $router->post(Select2Family::class, '/select2-family');
687                $router->post(Select2Individual::class, '/select2-individual');
688                $router->post(Select2Location::class, '/select2-location');
689                $router->post(Select2MediaObject::class, '/select2-media');
690                $router->post(Select2Note::class, '/select2-note');
691                $router->post(Select2Place::class, '/select2-place');
692                $router->post(Select2Source::class, '/select2-source');
693                $router->post(Select2Submission::class, '/select2-submission');
694                $router->post(Select2Submitter::class, '/select2-submitter');
695                $router->post(Select2Repository::class, '/select2-repository');
696                $router->get(SourcePage::class, '/source/{xref}{/slug}');
697                $router->get(SubmissionPage::class, '/submission/{xref}{/slug}');
698                $router->get(SubmitterPage::class, '/submitter/{xref}{/slug}');
699                $router->get(TreePageBlock::class, '/tree-page-block');
700                $router->get('example', '/…')
701                    ->isRoutable(false);
702            });
703
704            // Match module routes, with and without a tree.
705            $router->get('module-tree', '/module/{module}/{action}/{tree}', ModuleAction::class)
706                ->allows(RequestMethodInterface::METHOD_POST);
707            $router->get('module-no-tree', '/module/{module}/{action}', ModuleAction::class)
708                ->allows(RequestMethodInterface::METHOD_POST);
709            // Generate module routes only. The router cannot distinguish a private tree from no tree.
710            $router->get('module', '/module/{module}/{action}{/tree}')
711                ->isRoutable(false);
712
713            $router->get(HelpText::class, '/help/{topic}');
714            $router->post(SelectLanguage::class, '/language/{language}');
715            $router->post(Logout::class, '/logout');
716            $router->get(Ping::class, '/ping', Ping::class)
717                ->allows(RequestMethodInterface::METHOD_HEAD);
718            $router->post(SelectTheme::class, '/theme/{theme}');
719            $router->get(HomePage::class, '/');
720
721            // Special files, either dynamic or need to be in the root folder.
722            $router->get(AppleTouchIconPng::class, '/apple-touch-icon.png');
723            $router->get(BrowserconfigXml::class, '/browserconfig.xml');
724            $router->get(FaviconIco::class, '/favicon.ico');
725            $router->get(RobotsTxt::class, '/robots.txt');
726            $router->get(WebmanifestJson::class, '/webmanifest.json');
727        });
728    }
729}
730