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