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