getQueryParams()['id'] ?? $request->getParsedBody()['id'] ?? 0); // Check if we have a numeric _GET/_POST parameter for "id", then a site information can be resolved based. if (MathUtility::canBeInterpretedAsInteger($pageId)) { $pageId = (int)$pageId; $rootLine = null; if ($pageId > 0) { $rootLine = BackendUtility::BEgetRootLine($pageId); } $site = GeneralUtility::makeInstance(SiteMatcher::class)->matchByPageId($pageId, $rootLine); $request = $request->withAttribute('site', $site); $GLOBALS['TYPO3_REQUEST'] = $request; } return $handler->handle($request); } }