[TASK] Add IconUtility::getSpriteIconForResource() 90/27790/5
authorFrans Saris <franssaris@gmail.com>
Sat, 22 Feb 2014 19:48:54 +0000 (20:48 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Fri, 28 Feb 2014 18:23:07 +0000 (19:23 +0100)
commite997f2a6dc3d6b81bcc204ec13f3a4a2379986d5
tree0c69648e6fe6ae879fd0402ee18a5b8530718739
parent55ea30505f2e3e3a4b517e8ed53c1417df28c2b4
[TASK] Add IconUtility::getSpriteIconForResource()

With the introduction of FAL the files and folders are
objects and so there is more info than just a name/extension
to determine the right icon. And with file_metadata
you have the possibility to even add more info to
a file (access rights etc).

This patch adds a new method to the IconUtility API for
generating the sprite icon for a resource. There is also
a hook where other extensions can hook in and change
the icon, options and overlays.

Furthermore, all calls in the core are changed to
IconUtility::getSpriteIconForFile where a
File or Folder object was available.

Resolves: #56211
Documentation: #56412
Releases: 6.2
Change-Id: Ifae61dd65d690fffd90c66568e2647ebd403bce5
Reviewed-on: https://review.typo3.org/27790
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
Reviewed-by: Markus Klein
Reviewed-by: Stefan Froemken
Tested-by: Stefan Froemken
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/backend/Classes/ClickMenu/ClickMenu.php
typo3/sysext/backend/Classes/Clipboard/Clipboard.php
typo3/sysext/backend/Classes/Form/FormEngine.php
typo3/sysext/backend/Classes/Tree/View/FolderTreeView.php
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/backend/Classes/Utility/IconUtility.php
typo3/sysext/backend/Classes/Utility/IconUtilityOverrideResourceIconHookInterface.php [new file with mode: 0644]
typo3/sysext/backend/Tests/Unit/Utility/IconUtilityTest.php
typo3/sysext/filelist/Classes/FileList.php
typo3/sysext/recordlist/Classes/Browser/ElementBrowser.php