TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Extbase\Utility\FrontendSimulatorUtility Class Reference

Static Public Member Functions

static simulateFrontendEnvironment (\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $cObj=null)
 
static resetFrontendEnvironment ()
 

Static Protected Attributes

static $tsfeBackup
 

Detailed Description

Utilities to simulate a frontend in backend context.

ONLY USED INTERNALLY, MIGHT CHANGE WITHOUT NOTICE!

Definition at line 22 of file FrontendSimulatorUtility.php.

Member Function Documentation

◆ resetFrontendEnvironment()

static TYPO3\CMS\Extbase\Utility\FrontendSimulatorUtility::resetFrontendEnvironment ( )
static

Resets $GLOBALS['TSFE'] if it was previously changed by simulateFrontendEnvironment()

Returns
void
See also
simulateFrontendEnvironment()

Definition at line 50 of file FrontendSimulatorUtility.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager\getConfiguration().

◆ simulateFrontendEnvironment()

static TYPO3\CMS\Extbase\Utility\FrontendSimulatorUtility::simulateFrontendEnvironment ( \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer  $cObj = null)
static

Sets the $TSFE->cObjectDepthCounter in Backend mode This somewhat hacky work around is currently needed because the cObjGetSingle() function of relies on this setting

Parameters
\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer | NULL$cObj
Returns
void

Definition at line 36 of file FrontendSimulatorUtility.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

Referenced by TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager\getConfiguration().

Member Data Documentation

◆ $tsfeBackup

TYPO3\CMS\Extbase\Utility\FrontendSimulatorUtility::$tsfeBackup
staticprotected

Definition at line 27 of file FrontendSimulatorUtility.php.