--- HtmlViewHelper.php 2015-05-08 14:27:36.643423406 +0200
+++ HtmlViewHelperExtbase.php 2015-05-08 14:24:17.000000000 +0200
@@ -52,11 +52,6 @@
protected $contentObject;
/**
- * @var \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController contains a backup of the current $GLOBALS['TSFE'] if used in BE mode
- */
- protected $tsfeBackup;
-
- /**
* If the escaping interceptor should be disabled inside this ViewHelper, then set this value to FALSE.
* This is internal and NO part of the API. It is very likely to change.
*
@@ -102,8 +97,7 @@
* @return void
*/
protected function simulateFrontendEnvironment() {
- $this->tsfeBackup = isset($GLOBALS['TSFE']) ? $GLOBALS['TSFE'] : NULL;
- $GLOBALS['TSFE'] = new \stdClass();
+ \TYPO3\CMS\Extbase\Utility\FrontendSimulatorUtility::simulateFrontendEnvironment();
$GLOBALS['TSFE']->tmpl = new \stdClass();
$GLOBALS['TSFE']->tmpl->setup = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
}
@@ -115,6 +109,6 @@
* @see simulateFrontendEnvironment()
*/
protected function resetFrontendEnvironment() {
- $GLOBALS['TSFE'] = $this->tsfeBackup;
+ \TYPO3\CMS\Extbase\Utility\FrontendSimulatorUtility::resetFrontendEnvironment();
}
}