![]() |
TYPO3
7.6
|
Public Member Functions | |
__construct (IconRegistry $iconRegistry=null) | |
processAjaxRequest (ServerRequestInterface $request, ResponseInterface $response) | |
getIconForRecord ($table, array $row, $size=Icon::SIZE_DEFAULT) | |
mapRecordTypeToIconIdentifier ($table, array $row) | |
getIconForFileExtension ($fileExtension, $size=Icon::SIZE_DEFAULT, $overlayIdentifier=null) | |
getIconForResource (ResourceInterface $resource, $size=Icon::SIZE_DEFAULT, $overlayIdentifier=null, array $options=array()) | |
Protected Member Functions | |
mapRecordTypeToOverlayIdentifier ($table, array $row) | |
createIcon ($identifier, $size, $overlayIdentifier=null, array $iconConfiguration) | |
emitBuildIconForResourceSignal (ResourceInterface $resource, $size, array $options, $iconIdentifier, $overlayIdentifier) | |
getSignalSlotDispatcher () | |
Protected Attributes | |
$iconRegistry | |
$recordStatusMapping | |
$overlayPriorities | |
The main factory class, which acts as the entrypoint for generating an Icon object which is responsible for rendering an icon. Checks for the correct icon provider through the IconRegistry.
Definition at line 32 of file IconFactory.php.
__construct | ( | IconRegistry | $iconRegistry = null | ) |
IconRegistry | $iconRegistry |
Definition at line 74 of file IconFactory.php.
References IconFactory\$iconRegistry, and GeneralUtility\makeInstance().
|
protected |
Creates an icon object
string | $identifier | |
string | $size | "large", "small" or "default", see the constants of the Icon class |
string | $overlayIdentifier | |
array | $iconConfiguration | the icon configuration array |
Definition at line 454 of file IconFactory.php.
References GeneralUtility\makeInstance(), and Icon\SIZE_OVERLAY.
|
protected |
Emits a signal right after the identifiers are built.
ResourceInterface | $resource | |
string | $size | |
array | $options | |
string | $iconIdentifier | |
string | $overlayIdentifier |
\TYPO3\CMS\Extbase\SignalSlot\Exception\InvalidSlotException | |
\TYPO3\CMS\Extbase\SignalSlot\Exception\InvalidSlotReturnException |
Definition at line 482 of file IconFactory.php.
References IconFactory\getSignalSlotDispatcher().
Referenced by IconFactory\getIconForResource().
getIconForFileExtension | ( | $fileExtension, | |
$size = Icon::SIZE_DEFAULT , |
|||
$overlayIdentifier = null |
|||
) |
Get Icon for a file by its extension
string | $fileExtension | |
string | $size | "large" "small" or "default", see the constants of the Icon class |
string | $overlayIdentifier |
Definition at line 335 of file IconFactory.php.
Referenced by FormatsViewHelper\getIconForFileExtension().
getIconForRecord | ( | $table, | |
array | $row, | ||
$size = Icon::SIZE_DEFAULT |
|||
) |
This method is used throughout the TYPO3 Backend to show icons for a DB record
string | $table | The TCA table name |
array | $row | The DB record of the TCA table |
string | $size | "large" "small" or "default", see the constants of the Icon class |
Definition at line 147 of file IconFactory.php.
References IconFactory\mapRecordTypeToIconIdentifier(), and IconFactory\mapRecordTypeToOverlayIdentifier().
getIconForResource | ( | ResourceInterface | $resource, |
$size = Icon::SIZE_DEFAULT , |
|||
$overlayIdentifier = null , |
|||
array | $options = array() |
||
) |
This method is used throughout the TYPO3 Backend to show icons for files and folders
The method takes care of the translation of file extension to proper icon and for folders it will return the icon depending on the role of the folder.
If the given resource is a folder there are some additional options that can be used:
There is a hook in place to manipulate the icon name and overlays.
ResourceInterface | $resource | |
string | $size | "large" "small" or "default", see the constants of the Icon class |
string | $overlayIdentifier | |
array | $options | An associative array with additional options. |
Definition at line 359 of file IconFactory.php.
References elseif, IconFactory\emitBuildIconForResourceSignal(), ResourceInterface\getIdentifier(), ResourceInterface\getStorage(), FolderInterface\ROLE_READONLY_MOUNT, FolderInterface\ROLE_RECYCLER, FolderInterface\ROLE_TEMPORARY, and FolderInterface\ROLE_USER_MOUNT.
|
protected |
Get the SignalSlot dispatcher
Definition at line 495 of file IconFactory.php.
References GeneralUtility\makeInstance().
Referenced by IconFactory\emitBuildIconForResourceSignal().
mapRecordTypeToIconIdentifier | ( | $table, | |
array | $row | ||
) |
This helper functions looks up the column that is used for the type of the chosen TCA table and then fetches the corresponding iconName based on the chosen icon class in this TCA. The TCA looks up
see EXT:core/Configuration/TCA/pages.php for an example with the TCA table "pages"
string | $table | The TCA table |
array | $row | The selected record |
Definition at line 173 of file IconFactory.php.
References $GLOBALS, GeneralUtility\callUserFunction(), and elseif.
Referenced by IconFactory\getIconForRecord().
|
protected |
This helper functions checks if the DB record ($row) has any special status based on the TCA settings like hidden, starttime etc, and then returns a specific icon overlay identifier for the overlay of this DB record This method solely takes care of the overlay of this record, not any type
string | $table | The TCA table |
array | $row | The selected record |
Definition at line 261 of file IconFactory.php.
References $GLOBALS, Enumeration\cast(), and VersionState\DELETE_PLACEHOLDER.
Referenced by IconFactory\getIconForRecord().
processAjaxRequest | ( | ServerRequestInterface | $request, |
ResponseInterface | $response | ||
) |
ServerRequestInterface | $request | |
ResponseInterface | $response |
Definition at line 85 of file IconFactory.php.
References $response, Enumeration\cast(), MessageInterface\getBody(), ServerRequestInterface\getParsedBody(), ServerRequestInterface\getQueryParams(), and MessageInterface\withHeader().
|
protected |
Definition at line 37 of file IconFactory.php.
Referenced by IconFactory\__construct().
|
protected |
Definition at line 62 of file IconFactory.php.
|
protected |
Definition at line 44 of file IconFactory.php.