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