TYPO3  7.6
Static Public Member Functions | Static Public Attributes | Static Protected Member Functions | Static Protected Attributes | List of all members
SpriteManager Class Reference

Static Public Member Functions

static isInitialized ()
 
static addIconSprite (array $icons, $styleSheetFile= '')
 
static addSingleIcons (array $icons, $extKey= '')
 
static addTcaTypeIcon ($table, $type, $iconFile)
 

Static Public Attributes

static $tempPath = 'typo3temp/sprites/'
 

Static Protected Member Functions

static getCacheIdentifier ()
 

Static Protected Attributes

static $isInitialized = false
 

Detailed Description

TYPO3 sprite manager, used in BE and in FE if a BE user is logged in.

This class builds CSS definitions of registered icons, writes TCA definitions and registers sprite icons in a cache file.

A configurable handler class does the business task.

Deprecated:
since TYPO3 CMS 7, will be removed with TYPO3 CMS 8

Definition at line 28 of file SpriteManager.php.

Member Function Documentation

static addIconSprite ( array  $icons,
  $styleSheetFile = '' 
)
static

API for extensions to register own sprites.

Get an array of icon names and the styleSheetFile with defined sprite icons. The stylesheet filename should contain the extension name to be unique.

Naming conventions:

  • IconName: extensions-$extKey-$iconName
  • CSS class for loading the sprite: t3-icon-extensions-$extKey
  • CSS class for single icons: t3-icon-$extKey-$iconName
Parameters
array$iconsIcon names
string$styleSheetFileStylesheet filename relative to PATH_typo3. Skins do not need to supply the $styleSheetFile, if the CSS file is within the registered stylesheet folders
Returns
void
Deprecated:
since TYPO3 CMS 7, will be removed with TYPO3 CMS 8

Definition at line 142 of file SpriteManager.php.

References GeneralUtility\deprecationLog().

static addSingleIcons ( array  $icons,
  $extKey = '' 
)
static

API for extensions to register new sprite images which can be used with ::getSpriteIcon('extensions-$extKey-iconName');

Parameters
array$iconsIcons to be registered, $iconname => $iconFile, $iconFile must be relative to PATH_site
string$extKeyExtension key
Returns
void
Deprecated:
since TYPO3 CMS 7, will be removed with TYPO3 CMS 8

Definition at line 160 of file SpriteManager.php.

References GeneralUtility\deprecationLog().

Referenced by SpriteManagerTest\addSingleIconsWithEmptyValueSetsArrayKey(), SpriteManagerTest\addSingleIconsWithEmptyValueSetsImagePathValue(), SpriteManagerTest\addSingleIconsWithNormalValueSetsArrayKey(), and SpriteManagerTest\addSingleIconsWithNormalValueSetsImagePathValue().

static addTcaTypeIcon (   $table,
  $type,
  $iconFile 
)
static

API to register new type icons for tables which use "typeicon_classes" Can be used to provide icons for "modules" in pages table

Parameters
string$tableTable name to which the type icon should be added
string$typeType column name of the table
string$iconFileIcon filename, relative to PATH_typo3
Returns
void
Deprecated:
since TYPO3 CMS 7, will be removed with TYPO3 CMS 8

Definition at line 178 of file SpriteManager.php.

References GeneralUtility\deprecationLog().

Referenced by SpriteManagerTest\addTcaTypeIconWithEmptyValueSetsArrayKey(), SpriteManagerTest\addTcaTypeIconWithEmptyValueSetsEmptyArrayValue(), SpriteManagerTest\addTcaTypeIconWithTableAndTypeAndValueSetsArrayValue(), and SpriteManagerTest\addTcaTypeIconWithTableAndTypeSetsArrayKey().

static getCacheIdentifier ( )
staticprotected

Get cache identifier for $GLOBALS['TBE_STYLES']['spriteIconApi']['iconsAvailable']

Returns
string

Definition at line 121 of file SpriteManager.php.

static isInitialized ( )
static

Whether the sprite manager is initialized.

Returns
bool TRUE if sprite manager is initialized
Deprecated:
since TYPO3 CMS 7, will be removed with TYPO3 CMS 8

Definition at line 68 of file SpriteManager.php.

Member Data Documentation

$isInitialized = false
staticprotected

Is sprite manager initialized

Definition at line 38 of file SpriteManager.php.

$tempPath = 'typo3temp/sprites/'
static