getQueryParams()['M'] ?? $request->getParsedBody()['M'] ?? null; // Allow the login page to be displayed if routing is not used and on index.php // (consolidate RouteDispatcher::evaluateReferrer() when changing 'login' to something different) $pathToRoute = $request->getQueryParams()['route'] ?? $request->getParsedBody()['route'] ?? $moduleName ?? '/login'; if ($moduleName !== null) { // backwards compatibility for old module names // @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0. $router = GeneralUtility::makeInstance(Router::class); foreach ($router->getRoutes() as $routeIdentifier => $route) { if ($routeIdentifier === $moduleName) { $pathToRoute = $route->getPath(); break; } } trigger_error('Calling the TYPO3 Backend with "M" GET parameter will be removed in TYPO3 v10.0,' . ' the calling code calls this script with "&M=' . $moduleName . '" and needs to be adapted' . ' to use the TYPO3 API.', E_USER_DEPRECATED); } Bootstrap::initializeBackendRouter(); Bootstrap::loadExtTables(); // Add the route path to the request $request = $request->withAttribute('routePath', $pathToRoute); return $handler->handle($request); } }