For coders TYPO3 Tech Corner

[PHP] TypoScript usage in backend- or comand context

[PHP] TypoScript usage in backend- or comand context

public function initializeForTYPO3VLowerThan10(int $pageUid) { $GLOBALS['TT'] = new TimeTracker(); $pageRepository = GeneralUtility::makeInstance(PageRepository::class); $templateService = GeneralUtility::makeInstance(TemplateService::class); // get the rootline $rootLine = $pageRepository->getRootLine($pageUid); // initialize template service and generate typoscript configuration $templateService->init(); $templateService->runThroughTemplates($rootLine); $templateService->generateConfig(); \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($templateService, __FILE__ . ':' . __LINE__); } public function initializeForTYPO3V10(int $pageUid) { $rootlineUtil = GeneralUtility::makeInstance(RootlineUtility::class, [$pageUid]); $templateService = GeneralUtility::makeInstance(TemplateService::class); // get the rootline $rootLine = $rootlineUtil->get(); // initialize template service and generate typoscript configuration $templateService->runThroughTemplates($rootLine); $templateService->generateConfig(); \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($templateService, __FILE__ . ':' . __LINE__); }

Back

"Code faster, look at the time" - does this sound familiar to you?

How about time and respect for code quality? Working in a team? Automated tests?

Join us