Classes/Service/RedirectService.php
protected function bootFrontendController(?SiteInterface $site, array $queryParams): TypoScriptFrontendController
    {
        // disable page errors
        $GLOBALS['TYPO3_CONF_VARS']['FE']['pageUnavailable_handling'] = false;
        $controller = GeneralUtility::makeInstance(
            TypoScriptFrontendController::class,
            null,
            $site ? $site->getRootPageId() : $GLOBALS['TSFE']->id,
            0
        );
        $controller->fe_user = $GLOBALS['TSFE']->fe_user ?? null;
        $controller->fetch_the_id();
        $controller->calculateLinkVars($queryParams);
        $controller->getConfigArray();
        $controller->settingLanguage();
        $controller->settingLocale();
        $controller->newCObj();
        return $controller;
    }
protected function bootFrontendController(?SiteInterface $site, array $queryParams): TypoScriptFrontendController
    {
        // disable page errors
        $GLOBALS['TYPO3_CONF_VARS']['FE']['pageUnavailable_handling'] = false;
        $controller = GeneralUtility::makeInstance(
            TypoScriptFrontendController::class,
            null,
            $site ? $site->getRootPageId() : $GLOBALS['TSFE']->id,
            0
        );
        $controller->fe_user = $GLOBALS['TSFE']->fe_user ?? null;
        $controller->fetch_the_id();
        $controller->calculateLinkVars($queryParams);
        $controller->getConfigArray();
        $controller->settingLanguage();
        $controller->settingLocale();
        $controller->newCObj();
        return $controller;
    }
protected function bootFrontendController ( ? SiteInterface $ site , array $ queryParams ) : TypoScriptFrontendController { // disable page errors $ GLOBALS [ 'TYPO3_CONF_VARS' ] [ 'FE' ] [ 'pageUnavailable_handling' ] = false ; $ controller = GeneralUtility :: makeInstance ( TypoScriptFrontendController :: class , null , $ site ? $ site -> getRootPageId ( ) : $ GLOBALS [ 'TSFE' ] -> id , 0 ) ; $ controller -> fe_user = $ GLOBALS [ 'TSFE' ] -> fe_user ?? null ; $ controller -> fetch_the_id ( ) ; $ controller -> calculateLinkVars ( $ queryParams ) ; $ controller -> getConfigArray ( ) ; $ controller -> settingLanguage ( ) ; $ controller -> settingLocale ( ) ; $ controller -> newCObj ( ) ; return $ controller ; }
Finishing booting up TSFE, after that the following properties are available.

Instantiating is done by the middleware stack (see Configuration/RequestMiddlewares.php)

- TSFE->fe_user
- TSFE->sys_page
- TSFE->tmpl
- TSFE->config
- TSFE->cObj

So a link to a page can be generated.

@param SiteInterface|null $site
@param array $queryParams
@return TypoScriptFrontendController
Finishing booting up TSFE after that the following properties are available .