Index: t3lib/stddb/tables.php =================================================================== --- t3lib/stddb/tables.php (Revision 7895) +++ t3lib/stddb/tables.php (Arbeitskopie) @@ -544,7 +552,7 @@ /** * backend sprite icon-names */ -$GLOBALS['TBE_STYLES']['spriteIconApi']['coreSpriteImageName'] = array( +$GLOBALS['TBE_STYLES']['spriteIconApi']['coreSpriteImageNames'] = array( 'actions-version-document-remove', 'actions-document-paste-into', 'actions-system-cache-clear-impact-high', Index: t3lib/class.t3lib_spritemanager.php =================================================================== --- t3lib/class.t3lib_spritemanager.php (Revision 7895) +++ t3lib/class.t3lib_spritemanager.php (Arbeitskopie) @@ -73,6 +73,7 @@ // create a fileName, the hash includes all icons and css-styles registered and the extlist $this->tempFileName = PATH_site . t3lib_SpriteManager::$tempPath . md5(serialize($GLOBALS['TBE_STYLES']['spritemanager']) . + md5(serialize($GLOBALS['TBE_STYLES']['spriteIconApi']['coreSpriteImageNames'])) . $GLOBALS['TYPO3_CONF_VARS']['EXT']['extList']) . '.inc'; // if no cache-file for the current config ist present, regenerate it if(!@file_exists($this->tempFileName)) { @@ -111,7 +112,7 @@ $this->handler->generate(); // get all Icons registered from skins, merge with core-Icon-List - $availableSkinIcons = (array)$GLOBALS['TBE_STYLES']['spriteIconApi']['coreSpriteImageName']; + $availableSkinIcons = (array)$GLOBALS['TBE_STYLES']['spriteIconApi']['coreSpriteImageNames']; foreach ($GLOBALS['TBE_STYLES']['skins'] as $skinName => $skinData) { $availableSkinIcons = array_merge($availableSkinIcons, (array)$skinData['availableSpriteIcons']); } @@ -184,6 +185,20 @@ $GLOBALS['TBE_STYLES']['spritemanager']['singleIcons']['extensions-' . $extKey . '-' . $iconName] = $iconFile; } } + + /** + * static function to add a type-with icon to an already existent table which makes use of "typeicon_classes" + * feature or to provide icon for "modules" in pages table + * @param string $table the table the type has been added + * @param string $type the type - must equal the value of the column in the table + * @param string $iconFile relative to PATH_typo3 + */ + public static function addTcaTypeIcon($table, $type, $iconFile) { + $GLOBALS['TBE_STYLES']['spritemanager']['singleIcons']['tcarecords-' . $table . '-' . $type] = $iconFile; + if(isset($GLOBALS['TCA'][$table]['typeicon_classes'])) { + $GLOBALS['TCA'][$table]['typeicon_classes'][$type] = 'tcarecords-' . $table . '-' . $type; + } + } } ?>