TYPO3 CMS  TYPO3_6-2
TypoScriptFrontendControllerHook.php
Go to the documentation of this file.
1 <?php
3 
22 
28  public function hook_eofe($params, $pObj) {
29  // 2 means preview of a non-live workspace
30  if ($pObj->fePreview !== 2) {
31  return;
32  }
33 
34  $backendDomain = $this->getBackendUserAuthentication()->getSessionData('workspaces.backend_domain');
35  if (empty($backendDomain)) {
36  $backendDomain = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_HOST_ONLY');
37  }
38 
39  $previewParts = $this->getTypoScriptFrontendController()->cObj->cObjGetSingle('FLUIDTEMPLATE', array(
40  'file' => 'EXT:workspaces/Resources/Private/Templates/Preview/Preview.html',
41  'variables.' => array(
42  'backendDomain' => 'TEXT',
43  'backendDomain.' => array('value' => $backendDomain)
44  )
45  ));
46  $this->getTypoScriptFrontendController()->content = str_ireplace('</body>', $previewParts . '</body>', $this->getTypoScriptFrontendController()->content);
47  }
48 
52  protected function getTypoScriptFrontendController() {
53  return $GLOBALS['TSFE'];
54  }
55 
59  protected function getBackendUserAuthentication() {
60  return $GLOBALS['BE_USER'];
61  }
62 
63 }
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]