TYPO3 CMS  TYPO3_6-2
SwitchUserViewHelper.php
Go to the documentation of this file.
1 <?php
3 
23 
31  public function render(\TYPO3\CMS\Beuser\Domain\Model\BackendUser $backendUser, $emulate = FALSE) {
32  if ($backendUser->getUid() == $GLOBALS['BE_USER']->user['uid']) {
33  return '';
34  }
35  $title = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate(($emulate ? 'switchBackMode' : 'changeToMode'), 'beuser');
36  return '<a href="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('SwitchUser' => $backendUser->getUid(), 'switchBackUser' => $emulate))) . '" target="_top" title="' . htmlspecialchars($title) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon(('actions-system-backend-user-' . ($emulate ? 'emulate' : 'switch'))) . '</a>';
37  }
38 
39 }
static getSpriteIcon($iconName, array $options=array(), array $overlays=array())
static translate($key, $extensionName, $arguments=NULL)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]
render(\TYPO3\CMS\Beuser\Domain\Model\BackendUser $backendUser, $emulate=FALSE)