| 1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- namespace Opentalent\OtTemplating\Utility;
- use TYPO3\CMS\Core\Site\Entity\SiteInterface;
- use TYPO3\CMS\Core\Site\SiteFinder;
- use TYPO3\CMS\Core\Utility\GeneralUtility;
- class Tsfe
- {
- public function initializeFrontEndRendering($pageId = 0)
- {
- $siteFinder = GeneralUtility::makeInstance(SiteFinder::class);
- /** @var SiteInterface $site */
- $site = $siteFinder->getSiteByPageId($pageId);
- $GLOBALS['TSFE'] = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
- 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController',
- $GLOBALS['TYPO3_CONF_VARS'],
- $site,
- $site->getDefaultLanguage()
- );
- $GLOBALS['TSFE']->set_no_cache();
- $GLOBALS['TSFE']->fe_user = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication::class);
- $GLOBALS['TSFE']->fe_user->checkPid_value = 0;
- $GLOBALS['TSFE']->fe_user->start();
- $GLOBALS['TSFE']->fe_user->unpack_uc();
- $GLOBALS['TSFE']->determineId();
- $GLOBALS['TSFE']->getConfigArray();
- $GLOBALS['TSFE']->cObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer');
- $GLOBALS['TSFE']->settingLanguage();
- $GLOBALS['TSFE']->settingLocale();
- }
- }
|