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