TYPO3  7.6
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AbstractSpriteHandler Class Reference
Inheritance diagram for AbstractSpriteHandler:
SpriteIconGeneratorInterface SimpleSpriteHandler SpriteBuildingHandler

Public Member Functions

 __construct ()
 
 generate ()
 
 getAvailableIconNames ()
 

Protected Member Functions

 loadRegisteredSprites ()
 
 collectTcaSpriteIcons ()
 

Protected Attributes

 $iconNames = array()
 
 $styleSheetData = ''
 
 $cssTcaFile = ''
 

Detailed Description

An abstract class implementing SpriteIconGeneratorInterface. Provides base functionality for all handlers.

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

Definition at line 25 of file AbstractSpriteHandler.php.

Constructor & Destructor Documentation

__construct ( )

constructor just init's the temp-file-name

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

Definition at line 53 of file AbstractSpriteHandler.php.

References SpriteManager\$tempPath.

Member Function Documentation

collectTcaSpriteIcons ( )
protected

this method creates sprite icon names for all tables in TCA (including their possible type-icons) where there is no "typeicon_classes" of this TCA table ctrl section (moved form )

Returns
array Array as $iconName => $fileName

Definition at line 129 of file AbstractSpriteHandler.php.

References $GLOBALS, elseif, PathUtility\getRelativePathTo(), PathUtility\pathinfo(), and GeneralUtility\resolveBackPath().

Referenced by SimpleSpriteHandler\buildCssAndRegisterIcons(), and SpriteBuildingHandler\generate().

generate ( )

Interface function. This will be called from the sprite manager to refresh all caches.

Returns
void

Implements SpriteIconGeneratorInterface.

Definition at line 103 of file AbstractSpriteHandler.php.

References AbstractSpriteHandler\loadRegisteredSprites(), and GeneralUtility\writeFile().

getAvailableIconNames ( )

Returns the detected icon-names which may be used through ::getSpriteIcon.

Returns
array all generated and registered sprite-icon-names, will be empty if there are none

Implements SpriteIconGeneratorInterface.

Definition at line 117 of file AbstractSpriteHandler.php.

References AbstractSpriteHandler\$iconNames.

loadRegisteredSprites ( )
protected

Loads all stylesheet files registered through ::addIconSprite

In fact the stylesheet-files are copied to ::tempPath where they automatically will be included from via and

Returns
void

Definition at line 71 of file AbstractSpriteHandler.php.

References $GLOBALS, SpriteManager\$tempPath, and GeneralUtility\getFilesInDir().

Referenced by AbstractSpriteHandler\generate().

Member Data Documentation

$cssTcaFile = ''
protected

Definition at line 46 of file AbstractSpriteHandler.php.

$iconNames = array()
protected
$styleSheetData = ''
protected

Definition at line 39 of file AbstractSpriteHandler.php.