TYPO3 CMS  TYPO3_6-2
SimpleSpriteHandler.php
Go to the documentation of this file.
1 <?php
3 
28 
35 .t3-icon-###NAME### {
36  background-position: 0px 0px !important;
37  background-image: url(\'###IMAGE###\') !important;
38  background-size: contain;
39 }
40  ';
41 
48  public function generate() {
49  // Generate IconData for single Icons registered
50  $this->buildCssAndRegisterIcons();
51  parent::generate();
52  }
53 
64  protected function buildCssAndRegisterIcons() {
65  // Backpath from the stylesheet file ($cssTcaFile) to PATH_site dir
66  // in order to set the background-image URL paths correct
67  $iconPath = '../../' . TYPO3_mainDir;
68  $iconsToProcess = array_merge((array) $GLOBALS['TBE_STYLES']['spritemanager']['singleIcons'], $this->collectTcaSpriteIcons());
69  foreach ($iconsToProcess as $iconName => $iconFile) {
70  $css = str_replace('###NAME###', str_replace(array('extensions-', 'tcarecords-'), array('', ''), $iconName), $this->styleSheetTemplateExtIcons);
71  $css = str_replace('###IMAGE###', \TYPO3\CMS\Core\Utility\GeneralUtility::resolveBackPath($iconPath . $iconFile), $css);
72  $this->iconNames[] = $iconName;
73  $this->styleSheetData .= $css;
74  }
75  }
76 
77 }
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]