Zum Inhalt springen

TYPO3 10 Update

Erstellt am 3. November 2021 · 1 Antwort · letzte Antwort am 4. November 2021

Tags: Frage

Senguel ·

Hallo,

ich aktualisiere von TYPO3 9 auf TYPO3 10. In einem Scheduled Task wird ein Instance von TypoScriptFrontendController erstellt. Allerdings ist es in TYPO3 10 nicht mehr funktionsfähig.
Wo kann ich ein Beispiel für TYPO3 10 finden?

Mein aktuelle typo3 9 version:

private function initContentObjectRenderer()
{
// Preparation for link generation
$id = 1;
$type = 0;
if (!is_object($GLOBALS['TT'])) {
$GLOBALS['TT'] = new \TYPO3\CMS\Core\TimeTracker\TimeTracker;
$GLOBALS['TT']->start();
}
$GLOBALS['TSFE'] = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController', $GLOBALS['TYPO3_CONF_VARS'], $id, $type);
$GLOBALS['TSFE']->connectToDB();
$GLOBALS['TSFE']->initFEuser();
$GLOBALS['TSFE']->determineId();
$GLOBALS['TSFE']->initTemplate();
$GLOBALS['TSFE']->getConfigArray();

if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('realurl')) {
$rootline = \TYPO3\CMS\Backend\Utility\BackendUtility::BEgetRootLine($id);
$host = \TYPO3\CMS\Backend\Utility\BackendUtility::firstDomainRecord($rootline);
$_SERVER['HTTP_HOST'] = $host;
}

$this->contentObjectRenderer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer');
}