TYPO3 CMS  TYPO3_6-2
IconViewHelper.php
Go to the documentation of this file.
1 <?php
3 
21 
29  public function render($icon, $title = '') {
30  if (!empty($icon)) {
31  $absIconPath = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFilename($icon);
32  if (file_exists($absIconPath)) {
33  $icon = $GLOBALS['BACK_PATH'] . '../' . str_replace(PATH_site, '', $absIconPath);
34  }
35  } else {
36  $icon = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('reports') . 'ext_icon.png';
37  }
38  $content = '<img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], $icon, 'width="16" height="16"') . ' title="' . htmlspecialchars($title) . '" alt="' . htmlspecialchars($title) . '" />';
39  return $content;
40  }
41 
42 }
static skinImg($backPath, $src, $wHattribs='', $outputMode=0)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]