[TASK] Replace IconUtility with IconFactory for TCA records 72/43272/31
authorStephan Großberndt <stephan@grossberndt.de>
Sun, 13 Sep 2015 12:30:39 +0000 (14:30 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 20 Sep 2015 10:20:24 +0000 (12:20 +0200)
Implement replacement and replace all core usages of
IconUtility::getSpriteIconForRecord() with
IconFactory->getIconForRecord().

Register and fix several icon definitions for core tables.

Resolves: #69754
Releases: master
Change-Id: I5adf4f58a0331c77458049e19c7c8ca441b9e4cf
Reviewed-on: http://review.typo3.org/43272
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
68 files changed:
Build/Gruntfile.js
Build/Resources/Private/Icons/Mimetype/mimetypes-application.svg [new file with mode: 0644]
Build/Resources/Private/Icons/Mimetype/mimetypes-executable-executable.svg [deleted file]
typo3/sysext/backend/Classes/Backend/Avatar/Avatar.php
typo3/sysext/backend/Classes/Backend/ToolbarItems/ShortcutToolbarItem.php
typo3/sysext/backend/Classes/ClickMenu/ClickMenu.php
typo3/sysext/backend/Classes/Clipboard/Clipboard.php
typo3/sysext/backend/Classes/Controller/ContentElement/ElementInformationController.php
typo3/sysext/backend/Classes/Controller/ContentElement/MoveElementController.php
typo3/sysext/backend/Classes/Controller/NewRecordController.php
typo3/sysext/backend/Classes/Form/Container/InlineRecordContainer.php
typo3/sysext/backend/Classes/Form/Container/OuterWrapContainer.php
typo3/sysext/backend/Classes/Form/Element/GroupElement.php
typo3/sysext/backend/Classes/Form/Wizard/SuggestWizardDefaultReceiver.php
typo3/sysext/backend/Classes/RecordList/ElementBrowserRecordList.php
typo3/sysext/backend/Classes/Search/LiveSearch/LiveSearch.php
typo3/sysext/backend/Classes/Template/DocumentTemplate.php
typo3/sysext/backend/Classes/Tree/Pagetree/Commands.php
typo3/sysext/backend/Classes/Tree/View/AbstractTreeView.php
typo3/sysext/backend/Classes/Tree/View/PagePositionMap.php
typo3/sysext/backend/Classes/Utility/IconUtility.php
typo3/sysext/backend/Classes/View/PageLayoutView.php
typo3/sysext/backend/Resources/Public/Icons/Mimetype/mimetypes-application.svg [new file with mode: 0644]
typo3/sysext/backend/Resources/Public/Icons/Mimetype/mimetypes-executable-executable.svg [deleted file]
typo3/sysext/beuser/Classes/ViewHelpers/SpriteIconForRecordViewHelper.php
typo3/sysext/core/Classes/Imaging/IconFactory.php
typo3/sysext/core/Classes/Imaging/IconRegistry.php
typo3/sysext/core/Classes/Migrations/TcaMigration.php
typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php
typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php
typo3/sysext/core/Configuration/TCA/sys_file_storage.php
typo3/sysext/core/Configuration/TCA/sys_filemounts.php
typo3/sysext/core/Documentation/Changelog/master/Deprecation-69754-TcaCtrlIconfileUsingRelativePathToExtAndFilenameOnly.rst [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Imaging/IconFactoryTest.php
typo3/sysext/extensionmanager/ext_tables.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/PageInfoViewHelper.php
typo3/sysext/frontend/Classes/Controller/TranslationStatusController.php
typo3/sysext/frontend/Configuration/TCA/backend_layout.php
typo3/sysext/impexp/Classes/Controller/ImportExportController.php
typo3/sysext/impexp/Classes/ImportExport.php
typo3/sysext/impexp/Classes/View/ExportPageTreeView.php
typo3/sysext/indexed_search/Classes/Domain/Repository/AdministrationRepository.php
typo3/sysext/indexed_search/Configuration/TCA/index_config.php
typo3/sysext/info_pagetsconfig/Classes/Controller/InfoPageTyposcriptConfigController.php
typo3/sysext/linkvalidator/Classes/Report/LinkValidatorReport.php
typo3/sysext/lowlevel/Classes/View/DatabaseIntegrityView.php
typo3/sysext/opendocs/Classes/Backend/ToolbarItems/OpendocsToolbarItem.php
typo3/sysext/recordlist/Classes/Browser/ElementBrowser.php
typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
typo3/sysext/recordlist/Classes/Tree/View/ElementBrowserPageTreeView.php
typo3/sysext/recycler/Classes/Controller/DeletedRecordsController.php
typo3/sysext/rtehtmlarea/Configuration/TCA/tx_rtehtmlarea_acronym.php
typo3/sysext/scheduler/Configuration/TCA/tx_scheduler_task_group.php
typo3/sysext/scheduler/ext_tables.php
typo3/sysext/sys_action/Classes/ActionTask.php
typo3/sysext/sys_action/Classes/Backend/ToolbarItems/ActionToolbarItem.php
typo3/sysext/sys_action/Configuration/TCA/sys_action.php
typo3/sysext/sys_action/Resources/Public/Images/x-sys_action.png
typo3/sysext/sys_note/Configuration/TCA/sys_note.php
typo3/sysext/t3skin/images/icons/mimetypes/x-sys_action.png [deleted file]
typo3/sysext/tstemplate/Classes/Controller/TemplateAnalyzerModuleFunctionController.php
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateConstantEditorModuleFunctionController.php
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateInformationModuleFunctionController.php
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateObjectBrowserModuleFunctionController.php
typo3/sysext/version/Classes/Controller/VersionModuleController.php
typo3/sysext/wizard_crpages/Classes/Controller/CreatePagesWizardModuleFunctionController.php
typo3/sysext/wizard_sortpages/Classes/View/SortPagesWizardModuleFunction.php

index 05413a7..a5504ba 100644 (file)
@@ -186,7 +186,7 @@ module.exports = function(grunt) {
                                files: {
                                        '<%= paths.backend %>Public/Icons/Mimetype/mimetypes-compressed.svg': '<%= paths.icons %>Mimetype/mimetypes-compressed.svg',
                                        '<%= paths.backend %>Public/Icons/Mimetype/mimetypes-excel.svg': '<%= paths.icons %>Mimetype/mimetypes-excel.svg',
-                                       '<%= paths.backend %>Public/Icons/Mimetype/mimetypes-executable-executable.svg': '<%= paths.icons %>Mimetype/mimetypes-executable-executable.svg',
+                                       '<%= paths.backend %>Public/Icons/Mimetype/mimetypes-application.svg': '<%= paths.icons %>Mimetype/mimetypes-application.svg',
                                        '<%= paths.backend %>Public/Icons/Mimetype/mimetypes-media-audio.svg': '<%= paths.icons %>Mimetype/mimetypes-media-audio.svg',
                                        '<%= paths.backend %>Public/Icons/Mimetype/mimetypes-media-flash.svg': '<%= paths.icons %>Mimetype/mimetypes-media-flash.svg',
                                        '<%= paths.backend %>Public/Icons/Mimetype/mimetypes-media-image.svg': '<%= paths.icons %>Mimetype/mimetypes-media-image.svg',
diff --git a/Build/Resources/Private/Icons/Mimetype/mimetypes-application.svg b/Build/Resources/Private/Icons/Mimetype/mimetypes-application.svg
new file mode 100644 (file)
index 0000000..e5f6eea
--- /dev/null
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+        viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
+<g id="mimetype-executable-executable">
+       <path fill="#5599FF" d="M14,16H2V0h8l4,4V16z"/>
+       <polygon opacity="0.1" points="13.75,15.75 2.25,15.75 2.25,0.25 10,0.25 10,0 2,0 2,16 14,16 14,4 13.75,4        "/>
+       <path opacity="0.7" fill="#FFFFFF" d="M14,4h-4V0L14,4z"/>
+       <path opacity="0.3" d="M14,8l-4-4h4V8z"/>
+       <path fill="#FFFFFF" d="M9.33,10.06c0,0.05-0.04,0.12-0.1,0.12l-0.65,0.1c-0.03,0.11-0.08,0.21-0.13,0.32
+               c0.12,0.17,0.24,0.32,0.38,0.48c0.02,0.02,0.03,0.05,0.03,0.08c0,0.03-0.01,0.06-0.03,0.08c-0.08,0.11-0.55,0.62-0.67,0.62
+               c-0.03,0-0.06-0.01-0.09-0.03L7.6,11.46c-0.1,0.05-0.21,0.1-0.32,0.13c-0.02,0.21-0.04,0.44-0.1,0.65c-0.02,0.06-0.07,0.1-0.12,0.1
+               H6.28c-0.06,0-0.12-0.05-0.12-0.1l-0.1-0.64c-0.11-0.03-0.21-0.08-0.31-0.13l-0.49,0.37c-0.02,0.02-0.05,0.03-0.08,0.03
+               c-0.03,0-0.06-0.01-0.09-0.03c-0.11-0.1-0.6-0.55-0.6-0.67c0-0.03,0.01-0.05,0.03-0.08c0.12-0.16,0.25-0.31,0.37-0.48
+               c-0.06-0.11-0.11-0.22-0.15-0.34l-0.63-0.1C4.04,10.16,4,10.1,4,10.05V9.27c0-0.05,0.04-0.12,0.1-0.12l0.65-0.1
+               c0.03-0.11,0.08-0.21,0.13-0.32C4.76,8.57,4.63,8.41,4.5,8.25C4.48,8.23,4.47,8.2,4.47,8.17S4.48,8.11,4.5,8.09
+               c0.08-0.11,0.55-0.62,0.67-0.62c0.03,0,0.06,0.01,0.09,0.03l0.48,0.38c0.1-0.05,0.21-0.1,0.32-0.13C6.08,7.53,6.1,7.3,6.15,7.1
+               C6.17,7.04,6.22,7,6.28,7h0.78c0.06,0,0.12,0.05,0.12,0.1l0.1,0.64c0.11,0.03,0.21,0.08,0.31,0.13L8.08,7.5
+               C8.1,7.48,8.13,7.47,8.16,7.47c0.03,0,0.06,0.01,0.09,0.03c0.11,0.1,0.6,0.55,0.6,0.67c0,0.03-0.01,0.05-0.03,0.08
+               C8.7,8.41,8.58,8.56,8.46,8.73c0.05,0.11,0.1,0.22,0.14,0.34l0.63,0.1c0.06,0.01,0.1,0.07,0.1,0.13V10.06z M6.67,8.6
+               C6.08,8.6,5.6,9.08,5.6,9.67c0,0.59,0.48,1.07,1.07,1.07s1.07-0.48,1.07-1.07C7.73,9.08,7.25,8.6,6.67,8.6z M12,7.82
+               c0,0.06-0.54,0.12-0.62,0.13c-0.03,0.08-0.07,0.15-0.12,0.22c0.04,0.08,0.21,0.5,0.21,0.57c0,0.01,0,0.02-0.02,0.03
+               c-0.05,0.03-0.5,0.3-0.52,0.3c-0.05,0-0.37-0.42-0.41-0.48c-0.04,0-0.08,0.01-0.13,0.01c-0.04,0-0.08,0-0.12-0.01
+               c-0.04,0.06-0.35,0.48-0.41,0.48c-0.02,0-0.47-0.27-0.52-0.3C9.34,8.77,9.33,8.75,9.33,8.75c0-0.07,0.18-0.49,0.21-0.57
+               C9.5,8.1,9.45,8.03,9.42,7.95C9.34,7.95,8.8,7.89,8.8,7.82V7.24c0-0.06,0.54-0.12,0.62-0.13C9.45,7.04,9.5,6.96,9.55,6.9
+               c-0.04-0.08-0.21-0.5-0.21-0.57c0-0.01,0-0.02,0.02-0.03C9.4,6.27,9.85,6,9.87,6c0.05,0,0.37,0.41,0.41,0.47
+               c0.04,0,0.08-0.01,0.12-0.01c0.04,0,0.08,0,0.13,0.01c0.12-0.16,0.24-0.32,0.38-0.47L10.93,6c0.02,0,0.47,0.26,0.52,0.29
+               c0.01,0.01,0.02,0.02,0.02,0.03c0,0.08-0.17,0.49-0.21,0.57c0.05,0.07,0.09,0.14,0.12,0.22C11.46,7.12,12,7.18,12,7.24V7.82z
+                M12,12.09c0,0.06-0.54,0.12-0.62,0.13c-0.03,0.08-0.07,0.15-0.12,0.22c0.04,0.08,0.21,0.5,0.21,0.58c0,0.01,0,0.02-0.02,0.03
+               c-0.05,0.03-0.5,0.3-0.52,0.3c-0.05,0-0.37-0.42-0.41-0.48c-0.04,0-0.08,0.01-0.13,0.01c-0.04,0-0.08,0-0.12-0.01
+               c-0.04,0.06-0.35,0.48-0.41,0.48c-0.02,0-0.47-0.27-0.52-0.3c-0.01-0.01-0.02-0.02-0.02-0.03c0-0.07,0.18-0.49,0.21-0.58
+               c-0.05-0.07-0.09-0.14-0.12-0.22c-0.08-0.01-0.62-0.07-0.62-0.13v-0.58c0-0.06,0.54-0.12,0.62-0.13c0.03-0.08,0.07-0.15,0.12-0.22
+               c-0.04-0.08-0.21-0.5-0.21-0.57c0-0.01,0-0.02,0.02-0.03c0.05-0.02,0.5-0.29,0.52-0.29c0.05,0,0.37,0.41,0.41,0.47
+               c0.04,0,0.08-0.01,0.12-0.01c0.04,0,0.08,0,0.13,0.01c0.12-0.16,0.24-0.32,0.38-0.47l0.02-0.01c0.02,0,0.47,0.26,0.52,0.29
+               c0.01,0.01,0.02,0.02,0.02,0.03c0,0.08-0.17,0.49-0.21,0.57c0.05,0.07,0.09,0.14,0.12,0.22c0.08,0.01,0.62,0.07,0.62,0.13V12.09z
+                M10.4,7c-0.29,0-0.53,0.24-0.53,0.53c0,0.3,0.24,0.53,0.53,0.53c0.3,0,0.53-0.24,0.53-0.53C10.93,7.24,10.69,7,10.4,7z
+                M10.4,11.27c-0.29,0-0.53,0.24-0.53,0.53c0,0.3,0.24,0.53,0.53,0.53c0.3,0,0.53-0.24,0.53-0.53
+               C10.93,11.51,10.69,11.27,10.4,11.27z"/>
+</g>
+</svg>
diff --git a/Build/Resources/Private/Icons/Mimetype/mimetypes-executable-executable.svg b/Build/Resources/Private/Icons/Mimetype/mimetypes-executable-executable.svg
deleted file mode 100644 (file)
index e5f6eea..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
-        viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
-<g id="mimetype-executable-executable">
-       <path fill="#5599FF" d="M14,16H2V0h8l4,4V16z"/>
-       <polygon opacity="0.1" points="13.75,15.75 2.25,15.75 2.25,0.25 10,0.25 10,0 2,0 2,16 14,16 14,4 13.75,4        "/>
-       <path opacity="0.7" fill="#FFFFFF" d="M14,4h-4V0L14,4z"/>
-       <path opacity="0.3" d="M14,8l-4-4h4V8z"/>
-       <path fill="#FFFFFF" d="M9.33,10.06c0,0.05-0.04,0.12-0.1,0.12l-0.65,0.1c-0.03,0.11-0.08,0.21-0.13,0.32
-               c0.12,0.17,0.24,0.32,0.38,0.48c0.02,0.02,0.03,0.05,0.03,0.08c0,0.03-0.01,0.06-0.03,0.08c-0.08,0.11-0.55,0.62-0.67,0.62
-               c-0.03,0-0.06-0.01-0.09-0.03L7.6,11.46c-0.1,0.05-0.21,0.1-0.32,0.13c-0.02,0.21-0.04,0.44-0.1,0.65c-0.02,0.06-0.07,0.1-0.12,0.1
-               H6.28c-0.06,0-0.12-0.05-0.12-0.1l-0.1-0.64c-0.11-0.03-0.21-0.08-0.31-0.13l-0.49,0.37c-0.02,0.02-0.05,0.03-0.08,0.03
-               c-0.03,0-0.06-0.01-0.09-0.03c-0.11-0.1-0.6-0.55-0.6-0.67c0-0.03,0.01-0.05,0.03-0.08c0.12-0.16,0.25-0.31,0.37-0.48
-               c-0.06-0.11-0.11-0.22-0.15-0.34l-0.63-0.1C4.04,10.16,4,10.1,4,10.05V9.27c0-0.05,0.04-0.12,0.1-0.12l0.65-0.1
-               c0.03-0.11,0.08-0.21,0.13-0.32C4.76,8.57,4.63,8.41,4.5,8.25C4.48,8.23,4.47,8.2,4.47,8.17S4.48,8.11,4.5,8.09
-               c0.08-0.11,0.55-0.62,0.67-0.62c0.03,0,0.06,0.01,0.09,0.03l0.48,0.38c0.1-0.05,0.21-0.1,0.32-0.13C6.08,7.53,6.1,7.3,6.15,7.1
-               C6.17,7.04,6.22,7,6.28,7h0.78c0.06,0,0.12,0.05,0.12,0.1l0.1,0.64c0.11,0.03,0.21,0.08,0.31,0.13L8.08,7.5
-               C8.1,7.48,8.13,7.47,8.16,7.47c0.03,0,0.06,0.01,0.09,0.03c0.11,0.1,0.6,0.55,0.6,0.67c0,0.03-0.01,0.05-0.03,0.08
-               C8.7,8.41,8.58,8.56,8.46,8.73c0.05,0.11,0.1,0.22,0.14,0.34l0.63,0.1c0.06,0.01,0.1,0.07,0.1,0.13V10.06z M6.67,8.6
-               C6.08,8.6,5.6,9.08,5.6,9.67c0,0.59,0.48,1.07,1.07,1.07s1.07-0.48,1.07-1.07C7.73,9.08,7.25,8.6,6.67,8.6z M12,7.82
-               c0,0.06-0.54,0.12-0.62,0.13c-0.03,0.08-0.07,0.15-0.12,0.22c0.04,0.08,0.21,0.5,0.21,0.57c0,0.01,0,0.02-0.02,0.03
-               c-0.05,0.03-0.5,0.3-0.52,0.3c-0.05,0-0.37-0.42-0.41-0.48c-0.04,0-0.08,0.01-0.13,0.01c-0.04,0-0.08,0-0.12-0.01
-               c-0.04,0.06-0.35,0.48-0.41,0.48c-0.02,0-0.47-0.27-0.52-0.3C9.34,8.77,9.33,8.75,9.33,8.75c0-0.07,0.18-0.49,0.21-0.57
-               C9.5,8.1,9.45,8.03,9.42,7.95C9.34,7.95,8.8,7.89,8.8,7.82V7.24c0-0.06,0.54-0.12,0.62-0.13C9.45,7.04,9.5,6.96,9.55,6.9
-               c-0.04-0.08-0.21-0.5-0.21-0.57c0-0.01,0-0.02,0.02-0.03C9.4,6.27,9.85,6,9.87,6c0.05,0,0.37,0.41,0.41,0.47
-               c0.04,0,0.08-0.01,0.12-0.01c0.04,0,0.08,0,0.13,0.01c0.12-0.16,0.24-0.32,0.38-0.47L10.93,6c0.02,0,0.47,0.26,0.52,0.29
-               c0.01,0.01,0.02,0.02,0.02,0.03c0,0.08-0.17,0.49-0.21,0.57c0.05,0.07,0.09,0.14,0.12,0.22C11.46,7.12,12,7.18,12,7.24V7.82z
-                M12,12.09c0,0.06-0.54,0.12-0.62,0.13c-0.03,0.08-0.07,0.15-0.12,0.22c0.04,0.08,0.21,0.5,0.21,0.58c0,0.01,0,0.02-0.02,0.03
-               c-0.05,0.03-0.5,0.3-0.52,0.3c-0.05,0-0.37-0.42-0.41-0.48c-0.04,0-0.08,0.01-0.13,0.01c-0.04,0-0.08,0-0.12-0.01
-               c-0.04,0.06-0.35,0.48-0.41,0.48c-0.02,0-0.47-0.27-0.52-0.3c-0.01-0.01-0.02-0.02-0.02-0.03c0-0.07,0.18-0.49,0.21-0.58
-               c-0.05-0.07-0.09-0.14-0.12-0.22c-0.08-0.01-0.62-0.07-0.62-0.13v-0.58c0-0.06,0.54-0.12,0.62-0.13c0.03-0.08,0.07-0.15,0.12-0.22
-               c-0.04-0.08-0.21-0.5-0.21-0.57c0-0.01,0-0.02,0.02-0.03c0.05-0.02,0.5-0.29,0.52-0.29c0.05,0,0.37,0.41,0.41,0.47
-               c0.04,0,0.08-0.01,0.12-0.01c0.04,0,0.08,0,0.13,0.01c0.12-0.16,0.24-0.32,0.38-0.47l0.02-0.01c0.02,0,0.47,0.26,0.52,0.29
-               c0.01,0.01,0.02,0.02,0.02,0.03c0,0.08-0.17,0.49-0.21,0.57c0.05,0.07,0.09,0.14,0.12,0.22c0.08,0.01,0.62,0.07,0.62,0.13V12.09z
-                M10.4,7c-0.29,0-0.53,0.24-0.53,0.53c0,0.3,0.24,0.53,0.53,0.53c0.3,0,0.53-0.24,0.53-0.53C10.93,7.24,10.69,7,10.4,7z
-                M10.4,11.27c-0.29,0-0.53,0.24-0.53,0.53c0,0.3,0.24,0.53,0.53,0.53c0.3,0,0.53-0.24,0.53-0.53
-               C10.93,11.51,10.69,11.27,10.4,11.27z"/>
-</g>
-</svg>
index 1f71a8f..114125b 100644 (file)
@@ -15,6 +15,8 @@ namespace TYPO3\CMS\Backend\Backend\Avatar;
  */
 
 use TYPO3\CMS\Backend\Utility\IconUtility;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Service\DependencyOrderingService;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
@@ -53,7 +55,8 @@ class Avatar {
                // Icon
                $icon = '';
                if ($showIcon) {
-                       $icon = '<span class="avatar-icon">' . IconUtility::getSpriteIconForRecord('be_users', $backendUser) . '</span>';
+                       $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+                       $icon = '<span class="avatar-icon">' . $iconFactory->getIconForRecord('be_users', $backendUser, Icon::SIZE_SMALL)->render() . '</span>';
                }
 
                $image = $this->getImgTag($backendUser, $size);
index 166f5bb..a7eb804 100644 (file)
@@ -182,7 +182,7 @@ class ShortcutToolbarItem implements ToolbarItemInterface {
                        // No shortcuts added yet, show a small help message how to add shortcuts
                        $title = $languageService->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.bookmarks', TRUE);
                        $icon = '<span title="' . $title . '">' . $this->iconFactory->getIcon('actions-system-shortcut-new', Icon::SIZE_SMALL)->render() . '</span>';
-                       $label = str_replace('%icon%', $icon, $languageService->sL('LLL:EXT:lang/locallang_misc.xlf:bookmarkDescription'));
+                       $label = str_replace('%icon%', $icon, $languageService->sL('LLL:EXT:lang/locallang_misc.xlf:bookmarkDescription', TRUE));
                        $compiledShortcutMenu = '<p>' . $label . '</p>';
                } else {
                        $compiledShortcutMenu = implode(LF, $shortcutMenu);
@@ -756,9 +756,9 @@ class ShortcutToolbarItem implements ToolbarItemInterface {
                                        );
                                        $result = $databaseConnection->exec_SELECT_queryArray($sqlQueryParts);
                                        $row = $databaseConnection->sql_fetch_assoc($result);
-                                       $icon = IconUtility::getSpriteIconForRecord($table, (array)$row, array('title' => $titleAttribute));
+                                       $icon = '<span title="' . $titleAttribute . '">' . $this->iconFactory->getIconForRecord($table, (array)$row, Icon::SIZE_SMALL)->render() . '</span>';
                                } elseif ($shortcut['type'] == 'new') {
-                                       $icon = IconUtility::getSpriteIconForRecord($table, array(), array('title' => $titleAttribute));
+                                       $icon = '<span title="' . $titleAttribute . '">' . $this->iconFactory->getIconForRecord($table, array(), Icon::SIZE_SMALL)->render() . '</span>';
                                }
                                break;
                        case 'file_edit':
index ee400e7..a5e5410 100644 (file)
@@ -392,8 +392,9 @@ class ClickMenu {
                if (!is_array($this->rec)) {
                        $this->rec = array();
                }
+
                // Return the printed elements:
-               return $this->printItems($menuItems, $root ? $this->iconFactory->getIcon('apps-pagetree-root', Icon::SIZE_SMALL)->render() . htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) : IconUtility::getSpriteIconForRecord($table, $this->rec, array('title' => htmlspecialchars(BackendUtility::getRecordIconAltText($this->rec, $table)))) . BackendUtility::getRecordTitle($table, $this->rec, TRUE));
+               return $this->printItems($menuItems);
        }
 
        /**
@@ -453,7 +454,7 @@ class ClickMenu {
                if (!is_array($menuItems)) {
                        $menuItems = array();
                }
-               return $this->printItems($menuItems, $root ? $this->iconFactory->getIcon('apps-pagetree-root', Icon::SIZE_SMALL)->render() . htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) : IconUtility::getSpriteIconForRecord($table, $this->rec, array('title' => htmlspecialchars(BackendUtility::getRecordIconAltText($this->rec, $table)))) . BackendUtility::getRecordTitle($table, $this->rec, TRUE));
+               return $this->printItems($menuItems);
        }
 
        /**
@@ -1017,7 +1018,7 @@ class ClickMenu {
                // Processing by external functions?
                $menuItems = $this->externalProcessingOfFileMenuItems($menuItems);
                // Return the printed elements:
-               return $this->printItems($menuItems, $icon . $fileObject->getName());
+               return $this->printItems($menuItems);
        }
 
        /**
@@ -1190,7 +1191,7 @@ class ClickMenu {
                // Processing by external functions?
                $menuItems = $this->externalProcessingOfDBMenuItems($menuItems);
                // Return the printed elements:
-               return $this->printItems($menuItems, IconUtility::getSpriteIconForRecord($table, $this->rec, array('title' => BackendUtility::getRecordTitle($table, $this->rec, TRUE))));
+               return $this->printItems($menuItems);
        }
 
        /**
index 7e1b7fb..714bdd8 100644 (file)
@@ -415,7 +415,7 @@ class Clipboard {
                                                if (is_array($rec)) {
                                                        $lines[] = '
                                                                <tr>
-                                                                       <td nowrap="nowrap" class="col-icon">' . $this->linkItemText(IconUtility::getSpriteIconForRecord($table, $rec, array('style' => 'margin: 0 20px;', 'title' => htmlspecialchars(BackendUtility::getRecordIconAltText($rec, $table)))), $rec, $table) . '</td>
+                                                                       <td nowrap="nowrap" class="col-icon">' . $this->linkItemText($this->iconFactory->getIconForRecord($table, $rec, Icon::SIZE_SMALL)->render(), $rec, $table) . '</td>
                                                                        <td nowrap="nowrap" width="95%">' . $this->linkItemText(htmlspecialchars(GeneralUtility::fixed_lgd_cs(BackendUtility::getRecordTitle($table, $rec), $this->getBackendUser()->uc['titleLen'])), $rec, $table) . ($pad == 'normal' ? ' <strong>(' . ($this->clipData['normal']['mode'] == 'copy' ? $this->clLabel('copy', 'cm') : $this->clLabel('cut', 'cm')) . ')</strong>' : '') . '&nbsp;</td>
                                                                        <td nowrap="nowrap" class="col-control">
                                                                                <div class="btn-group">
@@ -486,7 +486,7 @@ class Clipboard {
                                foreach ($rows as $rec) {
                                        $lines[] = '
                                        <tr>
-                                               <td nowrap="nowrap" class="col-icon">' . IconUtility::getSpriteIconForRecord($table, $rec, array('style' => 'margin-left: 38px;')) . '</td>
+                                               <td nowrap="nowrap" class="col-icon">' . $this->iconFactory->getIconForRecord($table, $rec, Icon::SIZE_SMALL)->render() . '</td>
                                                <td nowrap="nowrap" width="95%">' . htmlspecialchars(GeneralUtility::fixed_lgd_cs(BackendUtility::getRecordTitle($table, $rec), $this->getBackendUser()->uc['titleLen'])) . $modeData . '</td>
                                                <td nowrap="nowrap" class="col-control"></td>
                                        </tr>';
index de82966..2f57a6c 100644 (file)
@@ -679,7 +679,7 @@ class ElementInformationController {
                                $parentRecordTitle = is_array($parentRecord)
                                        ? BackendUtility::getRecordTitle('pages', $parentRecord)
                                        : '';
-                               $icon = IconUtility::getSpriteIconForRecord($row['tablename'], $record);
+                               $icon = $this->iconFactory->getIconForRecord($row['tablename'], $record, Icon::SIZE_SMALL)->render();
                                $actions = $this->getRecordActions($row['tablename'], $row['recuid']);
                                $urlParameters = [
                                        'edit' => [
@@ -779,7 +779,7 @@ class ElementInformationController {
                foreach ($rows as $row) {
                        $record = BackendUtility::getRecord($row['ref_table'], $row['ref_uid']);
                        if ($record) {
-                               $icon = IconUtility::getSpriteIconForRecord($row['tablename'], $record);
+                               $icon = $this->iconFactory->getIconForRecord($row['tablename'], $record, Icon::SIZE_SMALL)->render();
                                $actions = $this->getRecordActions($row['ref_table'], $row['ref_uid']);
 
                                $urlParameters = [
index 33f691e..53bf288 100644 (file)
@@ -17,7 +17,6 @@ namespace TYPO3\CMS\Backend\Controller\ContentElement;
 use Psr\Http\Message\ServerRequestInterface;
 use Psr\Http\Message\ResponseInterface;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
-use TYPO3\CMS\Backend\Utility\IconUtility;
 use TYPO3\CMS\Core\Imaging\Icon;
 use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
@@ -150,7 +149,7 @@ class MoveElementController {
                        // Get record for element:
                        $elRow = BackendUtility::getRecordWSOL($this->table, $this->moveUid);
                        // Headerline: Icon, record title:
-                       $headerLine = IconUtility::getSpriteIconForRecord($this->table, $elRow, array('title' => htmlspecialchars(BackendUtility::getRecordIconAltText($elRow, $this->table))));
+                       $headerLine = '<span title="' . BackendUtility::getRecordIconAltText($elRow, $this->table) . '">' . $this->iconFactory->getIconForRecord($this->table, $elRow, Icon::SIZE_SMALL)->render() . '</span>';
                        $headerLine .= BackendUtility::getRecordTitle($this->table, $elRow, TRUE);
                        // Make-copy checkbox (clicking this will reload the page with the GET var makeCopy set differently):
                        $headerLine .= $this->doc->spacer(5);
@@ -177,7 +176,7 @@ class MoveElementController {
                                                        if ($backendUser->isInWebMount($pidPageInfo['pid'], $this->perms_clause)) {
                                                                $code .= '<a href="' . htmlspecialchars(GeneralUtility::linkThisScript(array('uid' => (int)$pageInfo['pid'], 'moveUid' => $this->moveUid))) . '">' . $this->iconFactory->getIcon('actions-view-go-up', Icon::SIZE_SMALL) . BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '</a><br />';
                                                        } else {
-                                                               $code .= IconUtility::getSpriteIconForRecord('pages', $pidPageInfo) . BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '<br />';
+                                                               $code .= $this->iconFactory->getIconForRecord('pages', $pidPageInfo, Icon::SIZE_SMALL)->render() . BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '<br />';
                                                        }
                                                }
                                        }
@@ -201,7 +200,7 @@ class MoveElementController {
                                        $posMap->moveOrCopy = $this->makeCopy ? 'copy' : 'move';
                                        $posMap->cur_sys_language = $this->sys_language;
                                        // Headerline for the parent page: Icon, record title:
-                                       $headerLine = IconUtility::getSpriteIconForRecord('pages', $pageInfo, array('title' => htmlspecialchars(BackendUtility::getRecordIconAltText($pageInfo, 'pages'))));
+                                       $headerLine = '<span title="' . BackendUtility::getRecordIconAltText($pageInfo, 'pages') . '">' . $this->iconFactory->getIconForRecord('pages', $pageInfo, Icon::SIZE_SMALL)->render() . '</span>';
                                        $headerLine .= BackendUtility::getRecordTitle('pages', $pageInfo, TRUE);
                                        // Load SHARED page-TSconfig settings and retrieve column list from there, if applicable:
                                        // SHARED page-TSconfig settings.
@@ -227,7 +226,7 @@ class MoveElementController {
                                                                        'moveUid' => $this->moveUid
                                                                ))) . '">' . $this->iconFactory->getIcon('actions-view-go-up', Icon::SIZE_SMALL) . BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '</a><br />';
                                                        } else {
-                                                               $code .= IconUtility::getSpriteIconForRecord('pages', $pidPageInfo) . BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '<br />';
+                                                               $code .= $this->iconFactory->getIconForRecord('pages', $pidPageInfo, Icon::SIZE_SMALL)->render() . BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '<br />';
                                                        }
                                                }
                                        }
@@ -270,7 +269,6 @@ class MoveElementController {
                        'csh' => '',
                        'back' => ''
                );
-               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
                if ($this->page_id) {
                        if ((string)$this->table == 'pages') {
                                $buttons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'move_el_pages');
@@ -278,7 +276,7 @@ class MoveElementController {
                                $buttons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'move_el_cs');
                        }
                        if ($this->R_URI) {
-                               $buttons['back'] = '<a href="' . htmlspecialchars($this->R_URI) . '" class="typo3-goBack" title="' . $this->getLanguageService()->getLL('goBack', TRUE) . '">' . $iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL) . '</a>';
+                               $buttons['back'] = '<a href="' . htmlspecialchars($this->R_URI) . '" class="typo3-goBack" title="' . $this->getLanguageService()->getLL('goBack', TRUE) . '">' . $this->iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL) . '</a>';
                        }
                }
                return $buttons;
index b53f520..9bee956 100644 (file)
@@ -268,7 +268,7 @@ class NewRecordController {
                        }
                        // Set header-HTML and return_url
                        if (is_array($this->pageinfo) && $this->pageinfo['uid']) {
-                               $iconImgTag = IconUtility::getSpriteIconForRecord('pages', $this->pageinfo, array('title' => htmlspecialchars($this->pageinfo['_thePath'])));
+                               $iconImgTag = '<span title="' . htmlspecialchars($this->pageinfo['_thePath']) . '">' . $this->iconFactory->getIconForRecord('pages', $this->pageinfo, Icon::SIZE_SMALL)->render() . '</span>';
                                $title = strip_tags($this->pageinfo[$GLOBALS['TCA']['pages']['ctrl']['label']]);
                        } else {
                                $iconImgTag = '<span title="' . htmlspecialchars($this->pageinfo['_thePath']) . '">' . $this->iconFactory->getIcon('apps-pagetree-root', Icon::SIZE_SMALL) . '</span>';
@@ -402,14 +402,14 @@ class NewRecordController {
                // New Page
                $table = 'pages';
                $v = $GLOBALS['TCA'][$table];
-               $pageIcon = IconUtility::getSpriteIconForRecord($table, array());
+               $pageIcon = $this->iconFactory->getIconForRecord($table, array(), Icon::SIZE_SMALL)->render();
                $newPageIcon = $this->iconFactory->getIcon('actions-page-new', Icon::SIZE_SMALL);
                $rowContent = '';
                // New pages INSIDE this pages
                $newPageLinks = array();
                if ($displayNewPagesIntoLink && $this->isTableAllowedForThisPage($this->pageinfo, 'pages') && $this->getBackendUserAuthentication()->check('tables_modify', 'pages') && $this->getBackendUserAuthentication()->workspaceCreateNewRecord(($this->pageinfo['_ORIG_uid'] ?: $this->id), 'pages')) {
                        // Create link to new page inside:
-                       $newPageLinks[] = $this->linkWrap(IconUtility::getSpriteIconForRecord($table, array()) . $lang->sL($v['ctrl']['title'], TRUE) . ' (' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:db_new.php.inside', TRUE) . ')', $table, $this->id);
+                       $newPageLinks[] = $this->linkWrap($this->iconFactory->getIconForRecord($table, array(), Icon::SIZE_SMALL)->render() . $lang->sL($v['ctrl']['title'], TRUE) . ' (' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:db_new.php.inside', TRUE) . ')', $table, $this->id);
                }
                // New pages AFTER this pages
                if ($displayNewPagesAfterLink && $this->isTableAllowedForThisPage($this->pidInfo, 'pages') && $this->getBackendUserAuthentication()->check('tables_modify', 'pages') && $this->getBackendUserAuthentication()->workspaceCreateNewRecord($this->pidInfo['uid'], 'pages')) {
@@ -448,7 +448,7 @@ class NewRecordController {
                                                && (($v['ctrl']['rootLevel'] xor $this->id) || $v['ctrl']['rootLevel'] == -1)
                                                && $this->getBackendUserAuthentication()->workspaceCreateNewRecord(($this->pageinfo['_ORIG_uid'] ? $this->pageinfo['_ORIG_uid'] : $this->id), $table)
                                        ) {
-                                               $newRecordIcon = IconUtility::getSpriteIconForRecord($table, array());
+                                               $newRecordIcon = $this->iconFactory->getIconForRecord($table, array(), Icon::SIZE_SMALL)->render();
                                                $rowContent = '';
                                                $thisTitle = '';
                                                // Create new link for record:
index 31c03f9..c0c7db7 100644 (file)
@@ -18,25 +18,24 @@ use TYPO3\CMS\Backend\Form\Element\InlineElementHookInterface;
 use TYPO3\CMS\Backend\Form\Exception\AccessDeniedContentEditException;
 use TYPO3\CMS\Backend\Form\FormDataCompiler;
 use TYPO3\CMS\Backend\Form\FormDataGroup\TcaDatabaseRecord;
+use TYPO3\CMS\Backend\Form\InlineRelatedRecordResolver;
+use TYPO3\CMS\Backend\Form\InlineStackProcessor;
 use TYPO3\CMS\Backend\Form\NodeFactory;
 use TYPO3\CMS\Backend\Form\Utility\FormEngineUtility;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
+use TYPO3\CMS\Core\Database\DatabaseConnection;
+use TYPO3\CMS\Core\Database\RelationHandler;
 use TYPO3\CMS\Core\Imaging\Icon;
 use TYPO3\CMS\Core\Imaging\IconFactory;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Resource\ProcessedFile;
 use TYPO3\CMS\Core\Resource\ResourceFactory;
-use TYPO3\CMS\Core\Utility\MathUtility;
+use TYPO3\CMS\Core\Type\Bitmask\Permission;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
+use TYPO3\CMS\Core\Utility\MathUtility;
 use TYPO3\CMS\Core\Utility\StringUtility;
 use TYPO3\CMS\Lang\LanguageService;
-use TYPO3\CMS\Backend\Utility\IconUtility;
-use TYPO3\CMS\Core\Type\Bitmask\Permission;
-use TYPO3\CMS\Core\Messaging\FlashMessage;
-use TYPO3\CMS\Core\Database\RelationHandler;
-use TYPO3\CMS\Core\Database\DatabaseConnection;
-use TYPO3\CMS\Backend\Form\InlineStackProcessor;
-use TYPO3\CMS\Backend\Form\InlineRelatedRecordResolver;
 
 /**
  * Render a single inline record relation.
@@ -422,15 +421,7 @@ class InlineRecordContainer extends AbstractContainer {
 
                $altText = BackendUtility::getRecordIconAltText($rec, $foreign_table);
 
-               // @todo: Hack for getSpriteIconForRecord
-               $recordForIconUtility = $rec;
-               if (isset($GLOBALS['TCA'][$foreign_table]['ctrl']['typeicon_column']) && is_array($rec[$GLOBALS['TCA'][$foreign_table]['ctrl']['typeicon_column']])) {
-                       $recordForIconUtility[$GLOBALS['TCA'][$foreign_table]['ctrl']['typeicon_column']] = implode(
-                               ',',
-                               $rec[$GLOBALS['TCA'][$foreign_table]['ctrl']['typeicon_column']]
-                       );
-               }
-               $iconImg = IconUtility::getSpriteIconForRecord($foreign_table, $recordForIconUtility, array('title' => htmlspecialchars($altText), 'id' => $objectId . '_icon'));
+               $iconImg = '<span title="' . $altText . '" id="' . htmlspecialchars($objectId) . '_icon' . '">' . $this->iconFactory->getIconForRecord($foreign_table, $rec, Icon::SIZE_SMALL)->render() . '</span>';
                $label = '<span id="' . $objectId . '_label">' . $recTitle . '</span>';
                $ctrl = $this->renderForeignRecordHeaderControl($parentUid, $foreign_table, $rec, $config, $isVirtualRecord);
                $thumbnail = FALSE;
@@ -458,10 +449,10 @@ class InlineRecordContainer extends AbstractContainer {
                                        if ($processedImage->getProperty('width')) {
                                                $imageUrl = $processedImage->getPublicUrl(TRUE);
                                                $thumbnail = '<img src="' . $imageUrl . '" ' .
-                                                                        'width="' . $processedImage->getProperty('width') . '" ' .
-                                                                        'height="' . $processedImage->getProperty('height') . '" ' .
-                                                                        'alt="' . htmlspecialchars($altText) . '" ' .
-                                                                        'title="' . htmlspecialchars($altText) . '">';
+                                                       'width="' . $processedImage->getProperty('width') . '" ' .
+                                                       'height="' . $processedImage->getProperty('height') . '" ' .
+                                                       'alt="' . htmlspecialchars($altText) . '" ' .
+                                                       'title="' . htmlspecialchars($altText) . '">';
                                        }
                                }
                        }
@@ -543,7 +534,7 @@ class InlineRecordContainer extends AbstractContainer {
                        }
                        $cells['info'] = '
                                <a class="btn btn-default" href="#" onclick="' . htmlspecialchars(('top.launchView(' . GeneralUtility::quoteJSvalue($table) . ', ' . GeneralUtility::quoteJSvalue($uid) . '); return false;')) . '" title="' . $languageService->sL('LLL:EXT:lang/locallang_mod_web_list.xlf:showInfo', TRUE) . '">
-                                       ' . $this->iconFactory->getIcon('actions-document-info', Icon::SIZE_SMALL)->render()  . '
+                                       ' . $this->iconFactory->getIcon('actions-document-info', Icon::SIZE_SMALL)->render() . '
                                </a>';
                }
                // If the table is NOT a read-only table, then show these links:
@@ -558,7 +549,7 @@ class InlineRecordContainer extends AbstractContainer {
                                        }
                                        $cells['new'] = '
                                                <a class="btn btn-default inlineNewButton ' . $this->inlineData['config'][$nameObject]['md5'] . '" href="#" onclick="' . htmlspecialchars($onClick) . '" title="' . $languageService->sL(('LLL:EXT:lang/locallang_mod_web_list.xlf:new' . ($isPagesTable ? 'Page' : 'Record')), TRUE) . '" ' . $style . '>
-                                                       ' . $this->iconFactory->getIcon('actions-' . ($isPagesTable ? 'page' : 'document') . '-new', Icon::SIZE_SMALL)->render()  . '
+                                                       ' . $this->iconFactory->getIcon('actions-' . ($isPagesTable ? 'page' : 'document') . '-new', Icon::SIZE_SMALL)->render() . '
                                                </a>';
                                }
                        }
@@ -596,8 +587,8 @@ class InlineRecordContainer extends AbstractContainer {
                                        ));
                                        $editOnClick = 'if (top.content.list_frame) {' .
                                                'top.content.list_frame.location.href=' .
-                                                       GeneralUtility::quoteJSvalue($url . '&returnUrl=') .
-                                                       '+top.rawurlencode(top.content.list_frame.document.location.pathname+top.content.list_frame.document.location.search)' .
+                                               GeneralUtility::quoteJSvalue($url . '&returnUrl=') .
+                                               '+top.rawurlencode(top.content.list_frame.document.location.pathname+top.content.list_frame.document.location.search)' .
                                                ';' .
                                        '}';
                                        $title = $languageService->sL('LLL:EXT:lang/locallang_core.xlf:cm.editMetadata');
@@ -610,7 +601,8 @@ class InlineRecordContainer extends AbstractContainer {
                        // "Delete" link:
                        if ($enabledControls['delete'] && ($isPagesTable && $localCalcPerms & Permission::PAGE_DELETE
                                        || !$isPagesTable && $calcPerms & Permission::CONTENT_EDIT
-                                       || $isSysFileReferenceTable && $calcPerms & Permission::PAGE_EDIT)) {
+                                       || $isSysFileReferenceTable && $calcPerms & Permission::PAGE_EDIT)
+                       ) {
                                $onClick = htmlspecialchars(('if (confirm('
                                        . GeneralUtility::quoteJSvalue($languageService->getLL('deleteWarning')) . ')) {        '
                                        . 'inline.deleteRecord(' . GeneralUtility::quoteJSvalue($nameObjectFtId) . ');'
@@ -630,15 +622,15 @@ class InlineRecordContainer extends AbstractContainer {
                                        $title = $languageService->sL(('LLL:EXT:lang/locallang_mod_web_list.xlf:unHide' . ($isPagesTable ? 'Page' : '')), TRUE);
                                        $cells['hide.unhide'] = '
                                                <a class="btn btn-default hiddenHandle ' . $className . '" href="#" onclick="'
-                                                       . htmlspecialchars($onClick) . '"' . 'title="' . $title . '">' .
-                                                       $this->iconFactory->getIcon('actions-edit-unhide', Icon::SIZE_SMALL) . '
+                                               . htmlspecialchars($onClick) . '"' . 'title="' . $title . '">' .
+                                               $this->iconFactory->getIcon('actions-edit-unhide', Icon::SIZE_SMALL) . '
                                                </a>';
                                } else {
                                        $title = $languageService->sL(('LLL:EXT:lang/locallang_mod_web_list.xlf:hide' . ($isPagesTable ? 'Page' : '')), TRUE);
                                        $cells['hide.hide'] = '
                                                <a class="btn btn-default hiddenHandle ' . $className . '" href="#" onclick="'
-                                                       . htmlspecialchars($onClick) . '"' . 'title="' . $title . '">' .
-                                                       $this->iconFactory->getIcon('actions-edit-hide', Icon::SIZE_SMALL) . '
+                                               . htmlspecialchars($onClick) . '"' . 'title="' . $title . '">' .
+                                               $this->iconFactory->getIcon('actions-edit-hide', Icon::SIZE_SMALL) . '
                                                </a>';
                                }
                        }
@@ -747,7 +739,7 @@ class InlineRecordContainer extends AbstractContainer {
                                }
                                // Check internals regarding access
                                $isRootLevelRestrictionIgnored = BackendUtility::isRootLevelRestrictionIgnored($table);
-                               if ($hasAccess|| (int)$calcPRec['pid'] === 0 && $isRootLevelRestrictionIgnored) {
+                               if ($hasAccess || (int)$calcPRec['pid'] === 0 && $isRootLevelRestrictionIgnored) {
                                        $hasAccess = (bool)$backendUser->recordEditAccessInternals($table, $calcPRec);
                                }
                        }
index 4f3db89..b3aed3c 100644 (file)
@@ -16,11 +16,12 @@ namespace TYPO3\CMS\Backend\Form\Container;
 
 use TYPO3\CMS\Backend\Form\Utility\FormEngineUtility;
 use TYPO3\CMS\Backend\Template\DocumentTemplate;
-use TYPO3\CMS\Backend\Utility\IconUtility;
+use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Lang\LanguageService;
-use TYPO3\CMS\Backend\Utility\BackendUtility;
 
 /**
  * Render header and footer row.
@@ -61,15 +62,8 @@ class OuterWrapContainer extends AbstractContainer {
                        $recordPath = BackendUtility::getRecordPath($this->data['effectivePid'], $permissionsClause, 15);
                }
 
-               // @todo: Hack for getSpriteIconForRecord
-               $recordForIconUtility = $row;
-               if (isset($GLOBALS['TCA'][$table]['ctrl']['typeicon_column']) && is_array($row[$GLOBALS['TCA'][$table]['ctrl']['typeicon_column']])) {
-                       $recordForIconUtility[$GLOBALS['TCA'][$table]['ctrl']['typeicon_column']] = implode(
-                               ',',
-                               $row[$GLOBALS['TCA'][$table]['ctrl']['typeicon_column']]
-                       );
-               }
-               $icon = IconUtility::getSpriteIconForRecord($table, $recordForIconUtility, array('title' => $recordPath));
+               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+               $icon = '<span title="' . htmlspecialchars($recordPath) . '">' . $iconFactory->getIconForRecord($table, $row, Icon::SIZE_SMALL)->render() . '</span>';
 
                // @todo: Could this be done in a more clever way? Does it work at all?
                $tableTitle = $languageService->sL($this->data['processedTca']['ctrl']['title']);
index a7e04e7..dd0b965 100644 (file)
@@ -259,7 +259,7 @@ class GroupElement extends AbstractFormElement {
                                                $allowedTables[] = array(
                                                        // @todo: access to globals!
                                                        'name' => htmlspecialchars($languageService->sL($GLOBALS['TCA'][$allowedTable]['ctrl']['title'])),
-                                                       'icon' => IconUtility::getSpriteIconForRecord($allowedTable, array()),
+                                                       'icon' => $this->iconFactory->getIconForRecord($allowedTable, array(), Icon::SIZE_SMALL)->render(),
                                                        'onClick' => 'setFormValueOpenBrowser(\'db\', ' . GeneralUtility::quoteJSvalue($parameterArray['itemFormElName'] . '|||' . $allowedTable) . '); return false;'
                                                );
                                        }
@@ -282,7 +282,7 @@ class GroupElement extends AbstractFormElement {
                                                $rr = BackendUtility::getRecordWSOL($this_table, $this_uid);
                                                $thumbnails[] = array(
                                                        'name' => BackendUtility::getRecordTitle($this_table, $rr, TRUE),
-                                                       'image' => IconUtility::getSpriteIconForRecord($this_table, $rr),
+                                                       'image' => $this->iconFactory->getIconForRecord($this_table, $rr, Icon::SIZE_SMALL)->render(),
                                                        'path' => BackendUtility::getRecordPath($rr['pid'], $perms_clause, 15),
                                                        'uid' => $rr['uid'],
                                                        'table' => $this_table
index 42f063a..2a3bad6 100644 (file)
@@ -16,6 +16,8 @@ namespace TYPO3\CMS\Backend\Form\Wizard;
 
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\Utility\IconUtility;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Lang\LanguageService;
 
@@ -147,6 +149,7 @@ class SuggestWizardDefaultReceiver {
                $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $this->table, $this->selectClause, '', $this->orderByStatement, $start . ', 50');
                $allRowsCount = $GLOBALS['TYPO3_DB']->sql_num_rows($res);
                if ($allRowsCount) {
+                       $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
                        while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                                // check if we already have collected the maximum number of records
                                if (count($rows) > $this->maxItems) {
@@ -158,9 +161,7 @@ class SuggestWizardDefaultReceiver {
                                if (!$this->checkRecordAccess($row, $row['uid'])) {
                                        continue;
                                }
-                               $spriteIcon = IconUtility::getSpriteIconForRecord(
-                                       $this->table, $row, array('style' => 'margin: 0 4px 0 -20px; padding: 0;')
-                               );
+                               $spriteIcon = $iconFactory->getIconForRecord($this->table, $row, Icon::SIZE_SMALL)->render();
                                $uid = $row['t3ver_oid'] > 0 ? $row['t3ver_oid'] : $row['uid'];
                                $path = $this->getRecordPath($row, $uid);
                                if (strlen($path) > 30) {
@@ -331,11 +332,12 @@ class SuggestWizardDefaultReceiver {
         *
         * @param array $row The record to get the icon for
         * @return string The path to the icon
-        * @deprecated since TYPO3 CMS 7, will be removed with TYPO3 CMS 8, use IconUtility::getSpriteIconForRecord() directly
+        * @deprecated since TYPO3 CMS 7, will be removed with TYPO3 CMS 8, use IconFactory::getIconForRecord() directly
         */
        protected function getIcon($row) {
                GeneralUtility::logDeprecatedFunction();
-               return IconUtility::getSpriteIconForRecord($this->mmForeignTable ?: $this->table, $row);
+               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+               return $iconFactory->getIconForRecord($this->mmForeignTable ?: $this->table, $row, Icon::SIZE_SMALL)->render();
        }
 
        /**
index 8156fdd..ff22b87 100644 (file)
@@ -109,7 +109,7 @@ class ElementBrowserRecordList extends DatabaseRecordList {
                        $code = BackendUtility::getRecordTitlePrep($code, $this->fixedL);
                }
                $title = BackendUtility::getRecordTitle($table, $row, FALSE, TRUE);
-               $ficon = IconUtility::getSpriteIconForRecord($table, $row);
+               $ficon = $this->iconFactory->getIconForRecord($table, $row, Icon::SIZE_SMALL)->render();
                $aOnClick = 'return insertElement(' . GeneralUtility::quoteJSvalue($table) . ', ' . GeneralUtility::quoteJSvalue($row['uid']) . ', \'db\', ' . GeneralUtility::quoteJSvalue($title) . ', \'\', \'\', ' . GeneralUtility::quoteJSvalue($ficon) . ');';
                $ATag = '<a href="#" onclick="' . $aOnClick . '" title="' . $this->getLanguageService()->getLL('addToList', TRUE) . '">';
                $ATag_alt = substr($ATag, 0, -4) . ',\'\',1);">';
index 3acd3be..8c40933 100644 (file)
@@ -16,6 +16,8 @@ namespace TYPO3\CMS\Backend\Search\LiveSearch;
 
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\Utility\IconUtility;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Type\Bitmask\Permission;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\MathUtility;
@@ -196,7 +198,6 @@ class LiveSearch {
         * @param string $orderBy
         * @param string $limit MySql Limit notation
         * @return array
-        * @see \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord()
         * @see getTitleFromCurrentRow()
         * @see getEditLink()
         */
@@ -212,12 +213,14 @@ class LiveSearch {
                );
                $result = $GLOBALS['TYPO3_DB']->exec_SELECT_queryArray($queryParts);
                $dbCount = $GLOBALS['TYPO3_DB']->sql_num_rows($result);
+               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
+                       $title = 'id=' . $row['uid'] . ', pid=' . $row['pid'];
                        $collect[] = array(
                                'id' => $tableName . ':' . $row['uid'],
                                'pageId' => $tableName === 'pages' ? $row['uid'] : $row['pid'],
                                'typeLabel' =>  $this->getTitleOfCurrentRecordType($tableName),
-                               'iconHTML' => IconUtility::getSpriteIconForRecord($tableName, $row, array('title' => 'id=' . $row['uid'] . ', pid=' . $row['pid'])),
+                               'iconHTML' => '<span title="' . htmlspecialchars($title) . '">' . $iconFactory->getIconForRecord($tableName, $row, Icon::SIZE_SMALL)->render() . '</span>',
                                'title' => BackendUtility::getRecordTitle($tableName, $row),
                                'editLink' => $this->getEditLink($tableName, $row)
                        );
index ee263ac..fbb9e0c 100644 (file)
@@ -595,7 +595,7 @@ function jumpToUrl(URL) {
        public function getHeader($table, $row, $path, $noViewPageIcon = FALSE, $tWrap = array('', ''), $enableClickMenu = TRUE) {
                $viewPage = '';
                if (is_array($row) && $row['uid']) {
-                       $iconImgTag = IconUtility::getSpriteIconForRecord($table, $row, array('title' => htmlspecialchars($path)));
+                       $iconImgTag = '<span title="' . htmlspecialchars($path) . '">' . $this->iconFactory->getIconForRecord($table, $row, Icon::SIZE_SMALL)->render() . '</span>';
                        $title = strip_tags(BackendUtility::getRecordTitle($table, $row));
                        $viewPage = $noViewPageIcon ? '' : $this->viewPageIcon($row['uid']);
                } else {
@@ -1857,7 +1857,7 @@ function jumpToUrl(URL) {
                // If there IS a real page
                if (is_array($pageRecord) && $pageRecord['uid']) {
                        $alttext = BackendUtility::getRecordIconAltText($pageRecord, 'pages');
-                       $iconImg = IconUtility::getSpriteIconForRecord('pages', $pageRecord, array('title' => $alttext));
+                       $iconImg = '<span title="' . htmlspecialchars($alttext) . '">' . $this->iconFactory->getIconForRecord('pages', $pageRecord, Icon::SIZE_SMALL)->render() . '</span>';
                        // Make Icon:
                        $theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($iconImg, 'pages', $pageRecord['uid']);
                        $uid = $pageRecord['uid'];
index 1d08d1e..3e39dc3 100644 (file)
@@ -345,7 +345,8 @@ class Commands {
                $subNode->setText(htmlspecialchars($visibleText), $field, $prefix, htmlspecialchars($suffix) . $stat);
                $subNode->setQTip($qtip);
                if ((int)$record['uid'] !== 0) {
-                       $spriteIconCode = IconUtility::getSpriteIconForRecord('pages', $record);
+                       $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+                       $spriteIconCode = $iconFactory->getIconForRecord('pages', $record, Icon::SIZE_SMALL)->render();
                } else {
                        $spriteIconCode = $iconFactory->getIcon('apps-pagetree-root', Icon::SIZE_SMALL)->render();
                }
index 54a9345..406dbb6 100644 (file)
@@ -632,9 +632,9 @@ abstract class AbstractTreeView {
                if (is_int($row)) {
                        $row = BackendUtility::getRecord($this->table, $row);
                }
-               $icon = IconUtility::getSpriteIconForRecord($this->table, $row, array(
-                       'title' => $this->showDefaultTitleAttribute ? 'UID: ' . $row['uid'] : $this->getTitleAttrib($row)
-               ));
+               $title = $this->showDefaultTitleAttribute ? htmlspecialchars('UID: ' . $row['uid']) : $this->getTitleAttrib($row);
+               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+               $icon = '<span title="' . $title. '">' . $iconFactory->getIconForRecord($this->table, $row, Icon::SIZE_SMALL)->render() . '</span>';
                return $this->wrapIcon($icon, $row);
        }
 
index ee23504..fd53eda 100644 (file)
@@ -16,6 +16,8 @@ namespace TYPO3\CMS\Backend\Tree\View;
 
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\Utility\IconUtility;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
@@ -515,7 +517,8 @@ class PagePositionMap {
         * @return string HTML
         */
        public function getRecordHeader($row) {
-               $line = IconUtility::getSpriteIconForRecord('tt_content', $row, array('title' => htmlspecialchars(BackendUtility::getRecordIconAltText($row, 'tt_content'))));
+               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+               $line = '<span title="' . BackendUtility::getRecordIconAltText($row, 'tt_content') . '">' . $iconFactory->getIconForRecord('tt_content', $row, Icon::SIZE_SMALL)->render() . '</span>';
                $line .= BackendUtility::getRecordTitle('tt_content', $row, TRUE);
                return $this->wrapRecordTitle($line, $row);
        }
index 1969ae3..30a3b9f 100644 (file)
@@ -75,8 +75,8 @@ class IconUtility {
                'mid' => 'mimetypes-media-audio',
                'swf' => 'mimetypes-media-flash',
                'swa' => 'mimetypes-media-flash',
-               'exe' => 'mimetypes-executable-executable',
-               'com' => 'mimetypes-executable-executable',
+               'exe' => 'mimetypes-application',
+               'com' => 'mimetypes-application',
                't3x' => 'mimetypes-compressed',
                't3d' => 'mimetypes-compressed',
                'zip' => 'mimetypes-compressed',
index 5be79e2..af25eff 100644 (file)
@@ -377,9 +377,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                                                if (substr($field, 0, 6) == 'table_') {
                                                        $f2 = substr($field, 6);
                                                        if ($GLOBALS['TCA'][$f2]) {
-                                                               $theData[$field] = '&nbsp;' . IconUtility::getSpriteIconForRecord($f2, array(), array(
-                                                                       'title' => $this->getLanguageService()->sL($GLOBALS['TCA'][$f2]['ctrl']['title'], TRUE)
-                                                                       ));
+                                                               $theData[$field] = '&nbsp;' . '<span title="' . $this->getLanguageService()->sL($GLOBALS['TCA'][$f2]['ctrl']['title'], TRUE) . '">' . $this->iconFactory->getIconForRecord($f2, array(), Icon::SIZE_SMALL)->render() . '</span>';
                                                        }
                                                } else {
                                                        $theData[$field] = '&nbsp;&nbsp;<strong>'
@@ -723,7 +721,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                                        BackendUtility::workspaceOL('pages_language_overlay', $lpRecord);
                                        $params = '&edit[pages_language_overlay][' . $lpRecord['uid'] . ']=edit&overrideVals[pages_language_overlay][sys_language_uid]=' . $lP;
                                        $lPLabel = $this->getPageLayoutController()->doc->wrapClickMenuOnIcon(
-                                               IconUtility::getSpriteIconForRecord('pages_language_overlay', $lpRecord),
+                                               $this->iconFactory->getIconForRecord('pages_language_overlay', $lpRecord, Icon::SIZE_SMALL)->render(),
                                                'pages_language_overlay',
                                                $lpRecord['uid']
                                        ) . $viewLink . ($this->getBackendUser()->check('tables_modify', 'pages_language_overlay')
@@ -735,7 +733,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                                } else {
                                        $params = '&edit[pages][' . $this->id . ']=edit';
                                        $lPLabel = $this->getPageLayoutController()->doc->wrapClickMenuOnIcon(
-                                                       IconUtility::getSpriteIconForRecord('pages', $this->pageRecord),
+                                                       $this->iconFactory->getIconForRecord('pages', $this->pageRecord, Icon::SIZE_SMALL)->render(),
                                                        'pages',
                                                        $this->id
                                                ) . $viewLink . ($this->getBackendUser()->check('tables_modify', 'pages_language_overlay')
@@ -1434,7 +1432,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                                                        $tableName = empty($split[0]) ? 'tt_content' : $split[0];
                                                        $shortcutRecord = BackendUtility::getRecord($tableName, $split[1]);
                                                        if (is_array($shortcutRecord)) {
-                                                               $icon = IconUtility::getSpriteIconForRecord($tableName, $shortcutRecord);
+                                                               $icon = $this->iconFactory->getIconForRecord($tableName, $shortcutRecord, Icon::SIZE_SMALL)->render();
                                                                $icon = $this->getPageLayoutController()->doc->wrapClickMenuOnIcon($icon, $tableName,
                                                                        $shortcutRecord['uid'], 1, '', '+copy,info,edit,view');
                                                                $shortcutContent[] = $icon
@@ -2050,7 +2048,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
        public function getIcon($table, $row) {
                // Initialization
                $altText = BackendUtility::getRecordIconAltText($row, $table);
-               $icon = IconUtility::getSpriteIconForRecord($table, $row, array('title' => $altText));
+               $icon = '<span title="' . $altText . '">' . $this->iconFactory->getIconForRecord($table, $row, Icon::SIZE_SMALL)->render() . '</span>';
                $this->counter++;
                // The icon with link
                if ($this->getBackendUser()->recordEditAccessInternals($table, $row)) {
@@ -2177,18 +2175,16 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                                if ($c || GeneralUtility::inList('tt_content', $tName)) {
                                        // Add row to menu:
                                        $out .= '
-                                       <td><a href="#' . $tName . '"></a>' . IconUtility::getSpriteIconForRecord(
-                                                       $tName,
-                                                       array(),
-                                                       array('title' => $this->getLanguageService()->sL($GLOBALS['TCA'][$tName]['ctrl']['title'], TRUE))
-                                               ) . '</td>';
+                                       <td><a href="#' . $tName . '" title="' . $this->getLanguageService()->sL($GLOBALS['TCA'][$tName]['ctrl']['title'], TRUE) . '"></a>'
+                                               . $this->iconFactory->getIconForRecord($tName, array(), Icon::SIZE_SMALL)->render()
+                                               . '</td>';
                                        // ... and to the internal array, activeTables we also add table icon and title (for use elsewhere)
-                                       $this->activeTables[$tName] = IconUtility::getSpriteIconForRecord(
-                                                       $tName,
-                                                       array(),
-                                                       array('title' => $this->getLanguageService()->sL($GLOBALS['TCA'][$tName]['ctrl']['title'], TRUE)
-                                                                       . ': ' . $c . ' ' . $this->getLanguageService()->getLL('records', TRUE))
-                                               . '&nbsp;' . $this->getLanguageService()->sL($GLOBALS['TCA'][$tName]['ctrl']['title'], TRUE);
+                                       $title = $this->getLanguageService()->sL($GLOBALS['TCA'][$tName]['ctrl']['title'], TRUE)
+                                               . ': ' . $c . ' ' . $this->getLanguageService()->getLL('records', TRUE);
+                                       $this->activeTables[$tName] = '<span title="' . $title. '">'
+                                               . $this->iconFactory->getIconForRecord($tName, array(), Icon::SIZE_SMALL)->render()
+                                               . '</span>'
+                                               . '&nbsp;' . $this->getLanguageService()->sL($GLOBALS['TCA'][$tName]['ctrl']['title'], TRUE);
                                }
                        }
                }
diff --git a/typo3/sysext/backend/Resources/Public/Icons/Mimetype/mimetypes-application.svg b/typo3/sysext/backend/Resources/Public/Icons/Mimetype/mimetypes-application.svg
new file mode 100644 (file)
index 0000000..ffc2ddb
--- /dev/null
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#59F" d="M14 16H2V0h8l4 4v12z"/><path opacity=".1" d="M13.75 15.75H2.25V.25H10V0H2v16h12V4h-.25"/><path opacity=".7" fill="#FFF" d="M14 4h-4V0l4 4z"/><path opacity=".3" d="M14 8l-4-4h4v4z"/><path fill="#FFF" d="M9.33 10.06c0 .05-.04.12-.1.12l-.65.1c-.03.11-.08.21-.13.32.12.17.24.32.38.48.02.02.03.05.03.08s-.01.06-.03.08c-.08.11-.55.62-.67.62-.03 0-.06-.01-.09-.03l-.47-.37c-.1.05-.21.1-.32.13-.02.21-.04.44-.1.65-.02.06-.07.1-.12.1h-.78c-.06 0-.12-.05-.12-.1l-.1-.64c-.11-.03-.21-.08-.31-.13l-.49.37c-.02.02-.05.03-.08.03s-.06-.01-.09-.03c-.11-.1-.6-.55-.6-.67 0-.03.01-.05.03-.08.12-.16.25-.31.37-.48-.06-.11-.11-.22-.15-.34l-.63-.1c-.07-.01-.11-.07-.11-.12v-.78c0-.05.04-.12.1-.12l.65-.1c.03-.11.08-.21.13-.32-.12-.16-.25-.32-.38-.48-.02-.02-.03-.05-.03-.08s.01-.06.03-.08c.08-.11.55-.62.67-.62.03 0 .06.01.09.03l.48.38c.1-.05.21-.1.32-.13.02-.22.04-.45.09-.65.02-.06.07-.1.13-.1h.78c.06 0 .12.05.12.1l.1.64c.11.03.21.08.31.13l.49-.37c.02-.02.05-.03.08-.03s.06.01.09.03c.11.1.6.55.6.67 0 .03-.01.05-.03.08-.12.16-.24.31-.36.48.05.11.1.22.14.34l.63.1c.06.01.1.07.1.13v.76zM6.67 8.6c-.59 0-1.07.48-1.07 1.07 0 .59.48 1.07 1.07 1.07s1.07-.48 1.07-1.07c-.01-.59-.49-1.07-1.07-1.07zM12 7.82c0 .06-.54.12-.62.13-.03.08-.07.15-.12.22.04.08.21.5.21.57 0 .01 0 .02-.02.03-.05.03-.5.3-.52.3-.05 0-.37-.42-.41-.48-.04 0-.08.01-.13.01-.04 0-.08 0-.12-.01-.04.06-.35.48-.41.48-.02 0-.47-.27-.52-.3l-.01-.02c0-.07.18-.49.21-.57-.04-.08-.09-.15-.12-.23-.08 0-.62-.06-.62-.13v-.58c0-.06.54-.12.62-.13.03-.07.08-.15.13-.21-.04-.08-.21-.5-.21-.57 0-.01 0-.02.02-.03.04-.03.49-.3.51-.3.05 0 .37.41.41.47.04 0 .08-.01.12-.01.04 0 .08 0 .13.01.12-.16.24-.32.38-.47h.02c.02 0 .47.26.52.29.01.01.02.02.02.03 0 .08-.17.49-.21.57.05.07.09.14.12.22.08.01.62.07.62.13v.58zm0 4.27c0 .06-.54.12-.62.13-.03.08-.07.15-.12.22.04.08.21.5.21.58 0 .01 0 .02-.02.03-.05.03-.5.3-.52.3-.05 0-.37-.42-.41-.48-.04 0-.08.01-.13.01-.04 0-.08 0-.12-.01-.04.06-.35.48-.41.48-.02 0-.47-.27-.52-.3-.01-.01-.02-.02-.02-.03 0-.07.18-.49.21-.58-.05-.07-.09-.14-.12-.22-.08-.01-.62-.07-.62-.13v-.58c0-.06.54-.12.62-.13.03-.08.07-.15.12-.22-.04-.08-.21-.5-.21-.57 0-.01 0-.02.02-.03.05-.02.5-.29.52-.29.05 0 .37.41.41.47.04 0 .08-.01.12-.01.04 0 .08 0 .13.01.12-.16.24-.32.38-.47l.02-.01c.02 0 .47.26.52.29.01.01.02.02.02.03 0 .08-.17.49-.21.57.05.07.09.14.12.22.08.01.62.07.62.13v.59zM10.4 7c-.29 0-.53.24-.53.53 0 .3.24.53.53.53.3 0 .53-.24.53-.53 0-.29-.24-.53-.53-.53zm0 4.27c-.29 0-.53.24-.53.53 0 .3.24.53.53.53.3 0 .53-.24.53-.53 0-.29-.24-.53-.53-.53z"/></svg>
\ No newline at end of file
diff --git a/typo3/sysext/backend/Resources/Public/Icons/Mimetype/mimetypes-executable-executable.svg b/typo3/sysext/backend/Resources/Public/Icons/Mimetype/mimetypes-executable-executable.svg
deleted file mode 100644 (file)
index ffc2ddb..0000000
+++ /dev/null
@@ -1 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#59F" d="M14 16H2V0h8l4 4v12z"/><path opacity=".1" d="M13.75 15.75H2.25V.25H10V0H2v16h12V4h-.25"/><path opacity=".7" fill="#FFF" d="M14 4h-4V0l4 4z"/><path opacity=".3" d="M14 8l-4-4h4v4z"/><path fill="#FFF" d="M9.33 10.06c0 .05-.04.12-.1.12l-.65.1c-.03.11-.08.21-.13.32.12.17.24.32.38.48.02.02.03.05.03.08s-.01.06-.03.08c-.08.11-.55.62-.67.62-.03 0-.06-.01-.09-.03l-.47-.37c-.1.05-.21.1-.32.13-.02.21-.04.44-.1.65-.02.06-.07.1-.12.1h-.78c-.06 0-.12-.05-.12-.1l-.1-.64c-.11-.03-.21-.08-.31-.13l-.49.37c-.02.02-.05.03-.08.03s-.06-.01-.09-.03c-.11-.1-.6-.55-.6-.67 0-.03.01-.05.03-.08.12-.16.25-.31.37-.48-.06-.11-.11-.22-.15-.34l-.63-.1c-.07-.01-.11-.07-.11-.12v-.78c0-.05.04-.12.1-.12l.65-.1c.03-.11.08-.21.13-.32-.12-.16-.25-.32-.38-.48-.02-.02-.03-.05-.03-.08s.01-.06.03-.08c.08-.11.55-.62.67-.62.03 0 .06.01.09.03l.48.38c.1-.05.21-.1.32-.13.02-.22.04-.45.09-.65.02-.06.07-.1.13-.1h.78c.06 0 .12.05.12.1l.1.64c.11.03.21.08.31.13l.49-.37c.02-.02.05-.03.08-.03s.06.01.09.03c.11.1.6.55.6.67 0 .03-.01.05-.03.08-.12.16-.24.31-.36.48.05.11.1.22.14.34l.63.1c.06.01.1.07.1.13v.76zM6.67 8.6c-.59 0-1.07.48-1.07 1.07 0 .59.48 1.07 1.07 1.07s1.07-.48 1.07-1.07c-.01-.59-.49-1.07-1.07-1.07zM12 7.82c0 .06-.54.12-.62.13-.03.08-.07.15-.12.22.04.08.21.5.21.57 0 .01 0 .02-.02.03-.05.03-.5.3-.52.3-.05 0-.37-.42-.41-.48-.04 0-.08.01-.13.01-.04 0-.08 0-.12-.01-.04.06-.35.48-.41.48-.02 0-.47-.27-.52-.3l-.01-.02c0-.07.18-.49.21-.57-.04-.08-.09-.15-.12-.23-.08 0-.62-.06-.62-.13v-.58c0-.06.54-.12.62-.13.03-.07.08-.15.13-.21-.04-.08-.21-.5-.21-.57 0-.01 0-.02.02-.03.04-.03.49-.3.51-.3.05 0 .37.41.41.47.04 0 .08-.01.12-.01.04 0 .08 0 .13.01.12-.16.24-.32.38-.47h.02c.02 0 .47.26.52.29.01.01.02.02.02.03 0 .08-.17.49-.21.57.05.07.09.14.12.22.08.01.62.07.62.13v.58zm0 4.27c0 .06-.54.12-.62.13-.03.08-.07.15-.12.22.04.08.21.5.21.58 0 .01 0 .02-.02.03-.05.03-.5.3-.52.3-.05 0-.37-.42-.41-.48-.04 0-.08.01-.13.01-.04 0-.08 0-.12-.01-.04.06-.35.48-.41.48-.02 0-.47-.27-.52-.3-.01-.01-.02-.02-.02-.03 0-.07.18-.49.21-.58-.05-.07-.09-.14-.12-.22-.08-.01-.62-.07-.62-.13v-.58c0-.06.54-.12.62-.13.03-.08.07-.15.12-.22-.04-.08-.21-.5-.21-.57 0-.01 0-.02.02-.03.05-.02.5-.29.52-.29.05 0 .37.41.41.47.04 0 .08-.01.12-.01.04 0 .08 0 .13.01.12-.16.24-.32.38-.47l.02-.01c.02 0 .47.26.52.29.01.01.02.02.02.03 0 .08-.17.49-.21.57.05.07.09.14.12.22.08.01.62.07.62.13v.59zM10.4 7c-.29 0-.53.24-.53.53 0 .3.24.53.53.53.3 0 .53-.24.53-.53 0-.29-.24-.53-.53-.53zm0 4.27c-.29 0-.53.24-.53.53 0 .3.24.53.53.53.3 0 .53-.24.53-.53 0-.29-.24-.53-.53-.53z"/></svg>
\ No newline at end of file
index 7e9daa2..a4675fe 100644 (file)
@@ -14,8 +14,11 @@ namespace TYPO3\CMS\Beuser\ViewHelpers;
  * The TYPO3 project - inspiring people to share!
  */
 
-use TYPO3\CMS\Backend\Utility\IconUtility;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Extbase\Domain\Model\BackendUser;
+use TYPO3\CMS\Extbase\Object\ObjectManager;
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface;
 use TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBackendViewHelper;
@@ -32,7 +35,7 @@ class SpriteIconForRecordViewHelper extends AbstractBackendViewHelper implements
         * @param string $table
         * @param object $object
         * @return string
-        * @see \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord($table, $row)
+        * @see IconFactory::getIconForRecord()
         */
        public function render($table, $object) {
                return static::renderStatic(
@@ -80,7 +83,9 @@ class SpriteIconForRecordViewHelper extends AbstractBackendViewHelper implements
                if (method_exists($object, 'getEndDateAndTime')) {
                        $row['endTime'] = $object->getEndDateAndTime();
                }
-               return IconUtility::getSpriteIconForRecord($table, $row);
+               /** @var IconFactory $iconFactory */
+               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+               return $iconFactory->getIconForRecord($table, $row, Icon::SIZE_SMALL)->render();
        }
 
 }
index 586730e..a3c0afb 100644 (file)
@@ -14,11 +14,11 @@ namespace TYPO3\CMS\Core\Imaging;
  * The TYPO3 project - inspiring people to share!
  */
 
-use TYPO3\CMS\Core\Type\Icon\IconState;
 use TYPO3\CMS\Core\Resource\File;
 use TYPO3\CMS\Core\Resource\FolderInterface;
 use TYPO3\CMS\Core\Resource\InaccessibleFolder;
 use TYPO3\CMS\Core\Resource\ResourceInterface;
+use TYPO3\CMS\Core\Type\Icon\IconState;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Versioning\VersionState;
 use TYPO3\CMS\Extbase\SignalSlot\Dispatcher;
@@ -35,6 +35,8 @@ class IconFactory {
        protected $iconRegistry;
 
        /**
+        * Mapping of file extensions to mimetypes
+        *
         * @var string[]
         */
        protected $fileExtensionMapping = array(
@@ -75,8 +77,8 @@ class IconFactory {
                'mid' => 'mimetypes-media-audio',
                'swf' => 'mimetypes-media-flash',
                'swa' => 'mimetypes-media-flash',
-               'exe' => 'mimetypes-executable-executable',
-               'com' => 'mimetypes-executable-executable',
+               'exe' => 'mimetypes-application',
+               'com' => 'mimetypes-application',
                't3x' => 'mimetypes-compressed',
                't3d' => 'mimetypes-compressed',
                'zip' => 'mimetypes-compressed',
@@ -110,6 +112,38 @@ class IconFactory {
        );
 
        /**
+        * Mapping of record status to overlays
+        *
+        * @var string[]
+        */
+       protected $recordStatusMapping = array(
+               'hidden' => 'overlay-hidden',
+               'fe_group' => 'overlay-restricted',
+               'starttime' => 'overlay-scheduled',
+               'endtime' => 'overlay-scheduled',
+               'futureendtime' => 'overlay-scheduled',
+               'readonly' => 'overlay-readonly',
+               'deleted' => 'overlay-deleted',
+               'missing' => 'overlay-missing',
+               'translated' => 'overlay-translated',
+               'protectedSection' => 'overlay-includes-subpages'
+       );
+
+       /**
+        * Order of priorities for overlays
+        *
+        * @var string[]
+        */
+       protected $overlayPriorities = array(
+               'hidden',
+               'starttime',
+               'endtime',
+               'futureendtime',
+               'protectedSection',
+               'fe_group'
+       );
+
+       /**
         * @param IconRegistry $iconRegistry
         */
        public function __construct(IconRegistry $iconRegistry = NULL) {
@@ -138,6 +172,7 @@ class IconFactory {
                $iconConfiguration = $this->iconRegistry->getIconConfigurationByIdentifier($identifier);
                $iconConfiguration['state'] = $state;
                $icon = $this->createIcon($identifier, $size, $overlayIdentifier, $iconConfiguration);
+
                /** @var IconProviderInterface $iconProvider */
                $iconProvider = GeneralUtility::makeInstance($iconConfiguration['provider']);
                $iconProvider->prepareIconMarkup($icon, $iconConfiguration['options']);
@@ -146,6 +181,187 @@ class IconFactory {
        }
 
        /**
+        * This method is used throughout the TYPO3 Backend to show icons for a DB record
+        *
+        * @param string $table The TCA table name
+        * @param array $row The DB record of the TCA table
+        * @param string $size "large" "small" or "default", see the constants of the Icon class
+        * @return Icon
+        */
+       public function getIconForRecord($table, array $row, $size = Icon::SIZE_DEFAULT) {
+               $iconIdentifier = $this->mapRecordTypeToIconIdentifier($table, $row);
+               $overlayIdentifier = $this->mapRecordTypeToOverlayIdentifier($table, $row);
+               if (empty($overlayIdentifier)) {
+                       $overlayIdentifier = NULL;
+               }
+               return $this->getIcon($iconIdentifier, $size, $overlayIdentifier);
+       }
+
+       /**
+        * 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
+        * - [ctrl][typeicon_column]
+        * -
+        * This method solely takes care of the type of this record, not any statuses used for overlays.
+        *
+        * see EXT:core/Configuration/TCA/pages.php for an example with the TCA table "pages"
+        *
+        * @param string $table The TCA table
+        * @param array $row The selected record
+        * @return string The icon identifier string for the icon of that DB record
+        */
+       protected function mapRecordTypeToIconIdentifier($table, array $row) {
+               $recordType = array();
+               $ref = NULL;
+
+               if (isset($GLOBALS['TCA'][$table]['ctrl']['typeicon_column'])) {
+                       $column = $GLOBALS['TCA'][$table]['ctrl']['typeicon_column'];
+                       if (isset($row[$column])) {
+                               // even if not properly documented the value of the typeicon_column in a record could be an array (multiselect)
+                               // in typeicon_classes a key could consist of a commaseparated string "foo,bar"
+                               // but mostly it should be only one entry in that array
+                               if (is_array($row[$column])) {
+                                       $recordType[1] = implode(',', $row[$column]);
+                               } else {
+                                       $recordType[1] = $row[$column];
+                               }
+                       } else {
+                               $recordType[1] = 'default';
+                       }
+                       // Workaround to give nav_hide pages a complete different icon
+                       // Although it's not a separate doctype
+                       // and to give root-pages an own icon
+                       if ($table === 'pages') {
+                               if ((int)$row['nav_hide'] > 0) {
+                                       $recordType[2] = $recordType[1] . '-hideinmenu';
+                               }
+                               if ((int)$row['is_siteroot'] > 0) {
+                                       $recordType[3] = $recordType[1] . '-root';
+                               }
+                               if (!empty($row['module'])) {
+                                       $recordType[4] = 'contains-' . $row['module'];
+                               }
+                               if ((int)$row['content_from_pid'] > 0) {
+                                       $recordType[4] = (int)$row['nav_hide'] === 0 ? 'page-contentFromPid' : 'page-contentFromPid-hideinmenu';
+                               }
+                       }
+                       if (is_array($GLOBALS['TCA'][$table]['ctrl']['typeicon_classes'])) {
+                               foreach ($recordType as $key => $type) {
+                                       if (isset($GLOBALS['TCA'][$table]['ctrl']['typeicon_classes'][$type])) {
+                                               $recordType[$key] = $GLOBALS['TCA'][$table]['ctrl']['typeicon_classes'][$type];
+                                       } else {
+                                               unset($recordType[$key]);
+                                       }
+                               }
+                               $recordType[0] = $GLOBALS['TCA'][$table]['ctrl']['typeicon_classes']['default'];
+                               if (isset($GLOBALS['TCA'][$table]['ctrl']['typeicon_classes']['mask'])) {
+                                       $recordType[5] = str_replace('###TYPE###', $row[$column], $GLOBALS['TCA'][$table]['ctrl']['typeicon_classes']['mask']);
+                               }
+                               if (isset($GLOBALS['TCA'][$table]['ctrl']['typeicon_classes']['userFunc'])) {
+                                       $parameters = array('row' => $row);
+                                       $recordType[6] = GeneralUtility::callUserFunction($GLOBALS['TCA'][$table]['ctrl']['typeicon_classes']['userFunc'], $parameters, $ref);
+                               }
+                       } else {
+                               foreach ($recordType as &$type) {
+                                       $type = 'tcarecords-' . $table . '-' . $type;
+                               }
+                               unset($type);
+                               $recordType[0] = 'tcarecords-' . $table . '-default';
+                       }
+               } elseif (is_array($GLOBALS['TCA'][$table]['ctrl']['typeicon_classes'])) {
+                       $recordType[0] = $GLOBALS['TCA'][$table]['ctrl']['typeicon_classes']['default'];
+               } else {
+                       $recordType[0] = 'tcarecords-' . $table . '-default';
+               }
+
+               krsort($recordType);
+               /** @var IconRegistry $iconRegistry */
+               $iconRegistry = GeneralUtility::makeInstance(IconRegistry::class);
+               foreach ($recordType as $iconName) {
+                       if ($iconRegistry->isRegistered($iconName)) {
+                               return $iconName;
+                       }
+               }
+
+               return 'default-not-found';
+       }
+
+       /**
+        * 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
+        *
+        * @param string $table The TCA table
+        * @param array $row The selected record
+        * @return string The status with the highest priority
+        */
+       protected function mapRecordTypeToOverlayIdentifier($table, array $row) {
+               $tcaCtrl = $GLOBALS['TCA'][$table]['ctrl'];
+               // Calculate for a given record the actual visibility at the moment
+               $status = array(
+                       'hidden' => FALSE,
+                       'starttime' => FALSE,
+                       'endtime' => FALSE,
+                       'futureendtime' => FALSE,
+                       'fe_group' => FALSE,
+                       'deleted' => FALSE,
+                       'protectedSection' => FALSE,
+                       'nav_hide' => (bool)$row['nav_hide']
+               );
+               // Icon state based on "enableFields":
+               if (is_array($tcaCtrl['enablecolumns'])) {
+                       $enableColumns = $tcaCtrl['enablecolumns'];
+                       // If "hidden" is enabled:
+                       if (isset($enableColumns['disabled']) && !empty($row[$enableColumns['disabled']])) {
+                               $status['hidden'] = TRUE;
+                       }
+                       // If a "starttime" is set and higher than current time:
+                       if (!empty($enableColumns['starttime']) && $GLOBALS['EXEC_TIME'] < (int)$row[$enableColumns['starttime']]) {
+                               $status['starttime'] = TRUE;
+                       }
+                       // If an "endtime" is set
+                       if (!empty($enableColumns['endtime'])) {
+                               if ((int)$row[$enableColumns['endtime']] > 0) {
+                                       if ((int)$row[$enableColumns['endtime']] < $GLOBALS['EXEC_TIME']) {
+                                               // End-timing applies at this point.
+                                               $status['endtime'] = TRUE;
+                                       } else {
+                                               // End-timing WILL apply in the future for this element.
+                                               $status['futureendtime'] = TRUE;
+                                       }
+                               }
+                       }
+                       // If a user-group field is set
+                       if (!empty($enableColumns['fe_group']) && $row[$enableColumns['fe_group']]) {
+                               $status['fe_group'] = TRUE;
+                       }
+               }
+               // If "deleted" flag is set (only when listing records which are also deleted!)
+               if (isset($tcaCtrl['delete']) && !empty($row[$tcaCtrl['delete']])) {
+                       $status['deleted'] = TRUE;
+               }
+               // Detecting extendToSubpages (for pages only)
+               if ($table === 'pages' && (int)$row['extendToSubpages'] > 0) {
+                       $status['protectedSection'] = TRUE;
+               }
+               if (isset($row['t3ver_state']) && VersionState::cast($row['t3ver_state'])->equals(VersionState::DELETE_PLACEHOLDER)) {
+                       $status['deleted'] = TRUE;
+               }
+
+               // Now only show the status with the highest priority
+               $iconName = '';
+               foreach ($this->overlayPriorities as $priority) {
+                       if ($status[$priority]) {
+                               $iconName = $this->recordStatusMapping[$priority];
+                               break;
+                       }
+               }
+
+               return $iconName;
+       }
+
+       /**
         * Get Icon for a file by its extension
         *
         * @param string $fileExtension
index d7ee87b..4d2bb12 100644 (file)
@@ -19,6 +19,7 @@ use TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider;
 use TYPO3\CMS\Core\Imaging\IconProvider\FontawesomeIconProvider;
 use TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Core\Utility\StringUtility;
 
 /**
  * Class IconRegistry, which makes it possible to register custom icons
@@ -27,6 +28,11 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
 class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
 
        /**
+        * @var bool
+        */
+       protected $tcaInitialized = FALSE;
+
+       /**
         * Registered icons
         *
         * @var array
@@ -41,16 +47,34 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
                ),
 
                // App icons
+               'apps-clipboard-images' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/clipboard-images.png'
+                       )
+               ),
+               'apps-clipboard-list' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/clipboard-list.png'
+                       )
+               ),
                'apps-filetree-folder-default' => array(
                        'provider' => SvgIconProvider::class,
                        'options' => array(
-                               'source' => 'EXT:backend/Resources/Public/Icons/App/apps-filetree-folder-default.svg',
+                               'source' => 'EXT:backend/Resources/Public/Icons/App/apps-filetree-folder-default.svg'
                        )
                ),
                'apps-filetree-folder-locked' => array(
                        'provider' => SvgIconProvider::class,
                        'options' => array(
-                               'source' => 'EXT:backend/Resources/Public/Icons/App/apps-filetree-folder-locked.svg',
+                               'source' => 'EXT:backend/Resources/Public/Icons/App/apps-filetree-folder-locked.svg'
+                       )
+               ),
+               'apps-filetree-folder-media' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/filetree-folder-media.png'
                        )
                ),
                'apps-filetree-folder-opened' => array(
@@ -107,6 +131,85 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
                                'name' => 'cog',
                        )
                ),
+
+               'apps-pagetree-page-backend-users' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/pagetree-page-backend-users.png',
+                       )
+               ),
+               'apps-pagetree-page-backend-users-hideinmenu' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/pagetree-page-backend-users-hideinmenu.png',
+                       )
+               ),
+               'apps-pagetree-page-backend-users-root' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/pagetree-page-backend-users-root.png',
+                       )
+               ),
+               'apps-pagetree-page-content-from-page' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/pagetree-page-content-from-page.png',
+                       )
+               ),
+               'apps-pagetree-page-content-from-page-hideinmenu' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/pagetree-page-content-from-page-hideinmenu.png',
+                       )
+               ),
+               'apps-pagetree-folder-contains-approve' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/pagetree-folder-contains-approve.png',
+                       )
+               ),
+               'apps-pagetree-folder-contains-board' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/pagetree-folder-contains-board.png',
+                       )
+               ),
+               'apps-pagetree-folder-contains-fe_users' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/pagetree-folder-contains-fe_users.png',
+                       )
+               ),
+               'apps-pagetree-folder-contains-news' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/pagetree-folder-contains-news.png',
+                       )
+               ),
+               'apps-pagetree-folder-contains-shop' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/pagetree-folder-contains-shop.png',
+                       )
+               ),
+               'apps-pagetree-folder-default' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/pagetree-folder-default.png',
+                       )
+               ),
+               'apps-pagetree-folder-hideinmenu' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/pagetree-folder-default.png',
+                       )
+               ),
+               'apps-pagetree-folder-root' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/pagetree-page-domain.png',
+                       )
+               ),
                'apps-pagetree-page-domain' => array(
                        'provider' => BitmapIconProvider::class,
                        'options' => array(
@@ -119,6 +222,101 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
                                'source' => 'EXT:t3skin/images/icons/apps/pagetree-page-default.png',
                        )
                ),
+               'apps-pagetree-page-mountpoint' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/pagetree-page-mountpoint.png',
+                       )
+               ),
+               'apps-pagetree-page-mountpoint-hideinmenu' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/pagetree-page-mountpoint-hideinmenu.png',
+                       )
+               ),
+               'apps-pagetree-page-mountpoint-root' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/pagetree-page-mountpoint-root.png',
+                       )
+               ),
+               'apps-pagetree-page-recycler' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/pagetree-page-recycler.png',
+                       )
+               ),
+               'apps-pagetree-page-recycler-hideinmenu' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/pagetree-page-recycler.png',
+                       )
+               ),
+               'apps-pagetree-page-not-in-menu' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/pagetree-page-not-in-menu.png',
+                       )
+               ),
+               'apps-pagetree-page-shortcut-external' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/pagetree-page-shortcut-external.png',
+                       )
+               ),
+               'apps-pagetree-page-shortcut' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/pagetree-page-shortcut.png',
+                       )
+               ),
+               'apps-pagetree-page-shortcut-hideinmenu' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/pagetree-page-shortcut-hideinmenu.png',
+                       )
+               ),
+               'apps-pagetree-page-shortcut-root' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/pagetree-page-shortcut-root.png',
+                       )
+               ),
+               'apps-pagetree-page-shortcut-external-hideinmenu' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/pagetree-page-shortcut-external-hideinmenu.png',
+                       )
+               ),
+               'apps-pagetree-page-shortcut-external-root' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/pagetree-page-shortcut-external-root.png',
+                       )
+               ),
+               'apps-pagetree-spacer' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/pagetree-spacer.png',
+                       )
+               ),
+               'apps-pagetree-spacer-hideinmenu' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/pagetree-spacer.png',
+                       )
+               ),
+               'apps-pagetree-spacer-root' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/apps/pagetree-page-domain.png',
+                       )
+               ),
+
+
+
+
+
                'apps-pagetree-root' => array(
                        'provider' => SvgIconProvider::class,
                        'options' => array(
@@ -753,88 +951,118 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
                ),
 
                // Status
-               'status-status-checked' => array(
-                       'provider' => FontawesomeIconProvider::class,
+               'status-user-admin' => array(
+                       'provider' => BitmapIconProvider::class,
                        'options' => array(
-                               'name' => 'check',
+                               'source' => 'EXT:t3skin/images/icons/status/user-admin.png'
                        )
                ),
-               'status-status-current' => array(
-                       'provider' => FontawesomeIconProvider::class,
+               'status-user-backend' => array(
+                       'provider' => BitmapIconProvider::class,
                        'options' => array(
-                               'name' => 'caret-right',
+                               'source' => 'EXT:t3skin/images/icons/status/user-backend.png'
                        )
                ),
-               'status-status-locked' => array(
-                       'provider' => FontawesomeIconProvider::class,
+               'status-user-frontend' => array(
+                       'provider' => BitmapIconProvider::class,
                        'options' => array(
-                               'name' => 'lock',
+                               'source' => 'EXT:t3skin/images/icons/status/user-frontend.png'
                        )
                ),
-               'status-status-reference-hard' => array(
+               'status-user-group-backend' => array(
                        'provider' => BitmapIconProvider::class,
                        'options' => array(
-                               'source' => 'EXT:t3skin/images/icons/status/status-reference-hard.png',
+                               'source' => 'EXT:t3skin/images/icons/status/user-group-backend.png'
                        )
                ),
-               'status-status-sorting-asc' => array(
-                       'provider' => FontawesomeIconProvider::class,
+               'status-user-group-frontend' => array(
+                       'provider' => BitmapIconProvider::class,
                        'options' => array(
-                               'name' => 'caret-up',
+                               'source' => 'EXT:t3skin/images/icons/status/user-group-frontend.png'
                        )
                ),
-               'status-status-sorting-desc' => array(
+               'status-dialog-ok' => array(
                        'provider' => FontawesomeIconProvider::class,
                        'options' => array(
-                               'name' => 'caret-down',
+                               'name' => 'check-circle',
                        )
                ),
-               'status-status-sorting-light-asc' => array(
+               'status-dialog-notification' => array(
                        'provider' => FontawesomeIconProvider::class,
                        'options' => array(
-                               'name' => 'caret-up',
+                               'name' => 'exclamation-circle'
                        )
                ),
-               'status-status-sorting-light-desc' => array(
+               'status-dialog-warning' => array(
                        'provider' => FontawesomeIconProvider::class,
                        'options' => array(
-                               'name' => 'caret-down',
+                               'name' => 'exclamation-triangle'
                        )
                ),
-               'status-dialog-ok' => array(
+               'status-dialog-error' => array(
                        'provider' => FontawesomeIconProvider::class,
                        'options' => array(
-                               'name' => 'check-circle',
+                               'name' => 'exclamation-circle'
                        )
                ),
-               'status-dialog-notification' => array(
+               'status-warning-lock' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/status/warning-lock.png'
+                       )
+               ),
+               'status-warning-in-use' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/status/warning-in-use.png'
+                       )
+               ),
+               'status-status-checked' => array(
                        'provider' => FontawesomeIconProvider::class,
                        'options' => array(
-                               'name' => 'exclamation-circle',
+                               'name' => 'check',
                        )
                ),
-               'status-dialog-warning' => array(
+               'status-status-current' => array(
                        'provider' => FontawesomeIconProvider::class,
                        'options' => array(
-                               'name' => 'exclamation-triangle',
+                               'name' => 'caret-right',
                        )
                ),
-               'status-dialog-error' => array(
+               'status-status-locked' => array(
                        'provider' => FontawesomeIconProvider::class,
                        'options' => array(
-                               'name' => 'exclamation-circle',
+                               'name' => 'lock',
                        )
                ),
-               'status-warning-lock' => array(
+               'status-status-reference-hard' => array(
                        'provider' => BitmapIconProvider::class,
                        'options' => array(
-                               'source' => 'EXT:t3skin/images/icons/status/warning-lock.png',
+                               'source' => 'EXT:t3skin/images/icons/status/status-reference-hard.png',
                        )
                ),
-               'status-warning-in-use' => array(
-                       'provider' => BitmapIconProvider::class,
+               'status-status-sorting-asc' => array(
+                       'provider' => FontawesomeIconProvider::class,
+                       'options' => array(
+                               'name' => 'caret-up',
+                       )
+               ),
+               'status-status-sorting-desc' => array(
+                       'provider' => FontawesomeIconProvider::class,
+                       'options' => array(
+                               'name' => 'caret-down',
+                       )
+               ),
+               'status-status-sorting-light-asc' => array(
+                       'provider' => FontawesomeIconProvider::class,
+                       'options' => array(
+                               'name' => 'caret-up',
+                       )
+               ),
+               'status-status-sorting-light-desc' => array(
+                       'provider' => FontawesomeIconProvider::class,
                        'options' => array(
-                               'source' => 'EXT:t3skin/images/icons/status/warning-in-use.png',
+                               'name' => 'caret-down',
                        )
                ),
                'status-status-permission-granted' => array(
@@ -863,22 +1091,22 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
                ),
 
                // Mimetypes
-               'mimetypes-compressed' => array(
+               'mimetypes-application' => array(
                        'provider' => SvgIconProvider::class,
                        'options' => array(
-                               'source' => 'EXT:backend/Resources/Public/Icons/Mimetype/mimetypes-compressed.svg'
+                               'source' => 'EXT:backend/Resources/Public/Icons/Mimetype/mimetypes-application.svg'
                        )
                ),
-               'mimetypes-excel' => array(
+               'mimetypes-compressed' => array(
                        'provider' => SvgIconProvider::class,
                        'options' => array(
-                               'source' => 'EXT:backend/Resources/Public/Icons/Mimetype/mimetypes-excel.svg'
+                               'source' => 'EXT:backend/Resources/Public/Icons/Mimetype/mimetypes-compressed.svg'
                        )
                ),
-               'mimetypes-executable-executable' => array(
+               'mimetypes-excel' => array(
                        'provider' => SvgIconProvider::class,
                        'options' => array(
-                               'source' => 'EXT:backend/Resources/Public/Icons/Mimetype/mimetypes-executable-executable.svg'
+                               'source' => 'EXT:backend/Resources/Public/Icons/Mimetype/mimetypes-excel.svg'
                        )
                ),
                'mimetypes-pdf' => array(
@@ -971,16 +1199,210 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
                                'source' => 'EXT:backend/Resources/Public/Icons/Mimetype/mimetypes-word.svg'
                        )
                ),
+
+               // Special Mimetypes
+               'mimetypes-x-content-divider' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/mimetypes/x-content-divider.png'
+                       )
+               ),
+               'mimetypes-x-content-domain' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/mimetypes/x-content-domain.png'
+                       )
+               ),
+               'mimetypes-x-content-form' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/mimetypes/x-content-form.png'
+                       )
+               ),
+               'mimetypes-x-content-form-search' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/mimetypes/x-content-form-search.png'
+                       )
+               ),
+               'mimetypes-x-content-header' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/mimetypes/x-content-header.png'
+                       )
+               ),
+               'mimetypes-x-content-html' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/mimetypes/x-content-html.png'
+                       )
+               ),
+               'mimetypes-x-content-image' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/mimetypes/x-content-image.png'
+                       )
+               ),
+               'mimetypes-x-content-link' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/mimetypes/x-content-link.png'
+                       )
+               ),
+               'mimetypes-x-content-list-bullets' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/mimetypes/x-content-list-bullets.png'
+                       )
+               ),
+               'mimetypes-x-content-list-files' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/mimetypes/x-content-list-files.png'
+                       )
+               ),
+               'mimetypes-x-content-login' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/mimetypes/x-content-login.png'
+                       )
+               ),
+               'mimetypes-x-content-menu' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/mimetypes/x-content-menu.png'
+                       )
+               ),
+               'mimetypes-x-content-multimedia' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/mimetypes/x-content-multimedia.png'
+                       )
+               ),
                'mimetypes-x-content-page-language-overlay' => array(
                        'provider' => BitmapIconProvider::class,
                        'options' => array(
-                               'source' => 'EXT:t3skin/images/icons/mimetypes/x-content-page-language-overlay.gif',
+                               'source' => 'EXT:t3skin/images/icons/mimetypes/x-content-page-language-overlay.gif'
+                       )
+               ),
+               'mimetypes-x-content-plugin' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/mimetypes/x-content-plugin.png'
+                       )
+               ),
+               'mimetypes-x-content-script' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/mimetypes/x-content-script.png'
+                       )
+               ),
+               'mimetypes-x-content-table' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/mimetypes/x-content-table.png'
+                       )
+               ),
+               'mimetypes-x-content-template' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/mimetypes/x-content-template.png'
+                       )
+               ),
+               'mimetypes-x-content-template-extension' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/mimetypes/x-content-template-extension.png'
                        )
                ),
                'mimetypes-x-content-template-static' => array(
                        'provider' => BitmapIconProvider::class,
                        'options' => array(
-                               'source' => 'EXT:t3skin/images/icons/mimetypes/x-content-template-static.png',
+                               'source' => 'EXT:t3skin/images/icons/mimetypes/x-content-template-static.png'
+                       )
+               ),
+               'mimetypes-x-content-text' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/mimetypes/x-content-text.png'
+                       )
+               ),
+               'mimetypes-x-content-text-picture' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/mimetypes/x-content-text-picture.png'
+                       )
+               ),
+               'mimetypes-x-backend_layout' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/icons/gfx/i/backend_layout.gif'
+                       )
+               ),
+               'mimetypes-x-index_config' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/icons/gfx/i/default.gif'
+                       )
+               ),
+               'mimetypes-x-sys_action' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:sys_action/Resources/Public/Images/x-sys_action.png'
+                       )
+               ),
+               'mimetypes-x-sys_category' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/mimetypes/x-sys_category.png'
+                       )
+               ),
+               'mimetypes-x-sys_language' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/mimetypes/x-sys_language.gif'
+                       )
+               ),
+               'mimetypes-x-sys_news' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/mimetypes/x-sys_news.png'
+                       )
+               ),
+               'mimetypes-x-sys_note' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:sys_note/ext_icon.png'
+                       )
+               ),
+               'mimetypes-x-sys_workspace' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/mimetypes/x-sys_workspace.png'
+                       )
+               ),
+               'mimetypes-x-sys_filemounts' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/icons/gfx/i/_icon_ftp.gif'
+                       )
+               ),
+               'mimetypes-x-sys_file_storage' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/icons/gfx/i/_icon_ftp.gif'
+                       )
+               ),
+               'mimetypes-x-tx_rtehtmlarea_acronym' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:rtehtmlarea/Resources/Public/Images/Plugins/Abbreviation/abbreviation.gif'
+                       )
+               ),
+               'mimetypes-x-tx_scheduler_task_group' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:scheduler/ext_icon.png'
                        )
                ),
 
@@ -1168,6 +1590,11 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
         * @throws Exception
         */
        public function getIconConfigurationByIdentifier($identifier) {
+               // In some cases TCA is not available, auto register TCA icons
+               // only the first time the TCA is available
+               if (!$this->tcaInitialized && !empty($GLOBALS['TCA'])) {
+                       $this->registerTCAIcons();
+               }
                if (!$this->isRegistered($identifier)) {
                        throw new Exception('Icon with identifier "' . $identifier . '" is not registered"', 1437425804);
                }
@@ -1202,4 +1629,57 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
                return array_keys($this->icons);
        }
 
+       /**
+        * Load icons from TCA for each table and add them as "tcarecords-XX" to $this->icons
+        */
+       protected function registerTCAIcons() {
+               // if TCA is not available, e.g. for some unit test, return directly
+               if (!is_array($GLOBALS['TCA'])) {
+                       return;
+               }
+
+               $resultArray = array();
+
+               $tcaTables = array_keys($GLOBALS['TCA']);
+               // check every table in the TCA, if an icon is needed
+               foreach ($tcaTables as $tableName) {
+                       // This method is only needed for TCA tables where typeicon_classes are not configured
+                       if (is_array($GLOBALS['TCA'][$tableName])) {
+                               $tcaCtrl = $GLOBALS['TCA'][$tableName]['ctrl'];
+                               $icon = NULL;
+                               if (isset($tcaCtrl['iconfile'])) {
+                                       if (StringUtility::beginsWith($tcaCtrl['iconfile'], 'EXT:')) {
+                                               $icon = $tcaCtrl['iconfile'];
+                                       } elseif (strpos($tcaCtrl['iconfile'], '/') !== FALSE) {
+                                               $icon = TYPO3_mainDir . GeneralUtility::resolveBackPath($tcaCtrl['iconfile']);
+                                       }
+                                       $resultArray['tcarecords-' . $tableName . '-default'] = $icon;
+                               }
+                       }
+               }
+               if (!empty($GLOBALS['TBE_STYLES']['spritemanager']['singleIcons'])) {
+                       foreach ($GLOBALS['TBE_STYLES']['spritemanager']['singleIcons'] as $iconIdentifier => $iconFile) {
+                               if (StringUtility::beginsWith($iconFile, '../typo3conf/ext/')) {
+                                       $iconFile = str_replace('../typo3conf/ext/', 'EXT:', $iconFile);
+                               }
+                               $resultArray[$iconIdentifier] = $iconFile;
+                       }
+               }
+
+               foreach ($resultArray as $iconIdentifier => $iconFilePath) {
+                       if (StringUtility::endsWith(strtolower($iconFilePath), 'svg')) {
+                               $iconProviderClass = SvgIconProvider::class;
+                       } else {
+                               $iconProviderClass = BitmapIconProvider::class;
+                       }
+                       $this->icons[$iconIdentifier] = array(
+                               'provider' => $iconProviderClass,
+                               'options' => array(
+                                       'source' => $iconFilePath
+                               )
+                       );
+               }
+               $this->tcaInitialized = TRUE;
+       }
+
 }
index 7fb1945..eb797f4 100644 (file)
@@ -47,6 +47,7 @@ class TcaMigration {
                $tca = $this->migrateIconsForFormFieldWizardsToNewLocation($tca);
                $tca = $this->migrateExtAndSysextPathToEXTPath($tca);
                $tca = $this->migrateIconsInOptionTags($tca);
+               $tca = $this->migrateIconfileRelativePathOrFilenameOnlyToExtReference($tca);
                // @todo: if showitem/defaultExtras wizards[xy] is migrated to columnsOverrides here, enableByTypeConfig could be dropped
                return $tca;
        }
@@ -466,4 +467,32 @@ class TcaMigration {
 
                return $newTca;
        }
+
+       /**
+        * Migrate "iconfile" references which starts with ../ to EXT: and consisting of filename only to absolute paths in EXT:t3skin
+        *
+        * @param array $tca Incoming TCA
+        * @return array Migrated TCA
+        */
+       protected function migrateIconfileRelativePathOrFilenameOnlyToExtReference($tca) {
+               foreach ($tca as $table => &$tableDefinition) {
+                       if (!isset($tableDefinition['ctrl']) || !is_array($tableDefinition['ctrl'])) {
+                               continue;
+                       }
+                       if (!isset($tableDefinition['ctrl']['iconfile'])) {
+                               continue;
+                       }
+                       if (StringUtility::beginsWith($tableDefinition['ctrl']['iconfile'], '../typo3conf/ext/')) {
+                               $tableDefinition['ctrl']['iconfile'] = str_replace('../typo3conf/ext/', 'EXT:', $tableDefinition['ctrl']['iconfile']);
+                               $tcaPath = implode('.', [$table, 'ctrl', 'iconfile']);
+                               $this->messages[] = '[' . $tcaPath . '] relative path to ../typo3conf/ext/ is deprecated, use EXT: instead';
+                       } elseif (strpos($tableDefinition['ctrl']['iconfile'], '/') === FALSE) {
+                               $tableDefinition['ctrl']['iconfile'] = 'EXT:t3skin/icons/gfx/i/' . $tableDefinition['ctrl']['iconfile'];
+                               $tcaPath = implode('.', [$table, 'ctrl', 'iconfile']);
+                               $this->messages[] = '[' . $tcaPath . '] filename only is deprecated, use EXT: or absolute reference instead';
+                       }
+               }
+               return $tca;
+       }
+
 }
index 94362a5..f530623 100644 (file)
@@ -17,14 +17,14 @@ namespace TYPO3\CMS\Core\TypoScript;
 use TYPO3\CMS\Backend\Template\DocumentTemplate;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\Utility\IconUtility;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\MathUtility;
 use TYPO3\CMS\Core\Utility\PathUtility;
 use TYPO3\CMS\Dbal\Database\DatabaseConnection;
 use TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher;
 use TYPO3\CMS\Lang\LanguageService;
-use TYPO3\CMS\Core\Imaging\Icon;
-use TYPO3\CMS\Core\Imaging\IconFactory;
 
 /**
  * TSParser extension class to TemplateService
@@ -677,7 +677,7 @@ class ExtendedTemplateService extends TemplateService {
                        $alttext = '[' . $row['templateID'] . ']';
                        $alttext .= $row['pid'] ? ' - ' . BackendUtility::getRecordPath($row['pid'], $GLOBALS['SOBE']->perms_clause, 20) : '';
                        $icon = substr($row['templateID'], 0, 3) === 'sys'
-                               ? IconUtility::getSpriteIconForRecord('sys_template', $row, array('title' => $alttext))
+                               ? '<span title="' . htmlspecialchars($alttext) . '">' . $iconFactory->getIconForRecord('sys_template', $row, Icon::SIZE_SMALL)->render() . '</span>'
                                : '<span title="' . htmlspecialchars($alttext) . '">' . $iconFactory->getIcon('mimetypes-x-content-template-static', Icon::SIZE_SMALL)->render() . '</span>';
                        if (in_array($row['templateID'], $this->clearList_const) || in_array($row['templateID'], $this->clearList_setup)) {
                                $urlParameters = array(
index ba5f648..ab891bc 100644 (file)
@@ -16,6 +16,8 @@ namespace TYPO3\CMS\Core\Utility\File;
 
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\Utility\IconUtility;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Messaging\FlashMessageService;
 use TYPO3\CMS\Core\Resource\DuplicationBehavior;
@@ -408,13 +410,14 @@ class ExtendedFileUtility extends BasicFileUtility {
                                $shortcutContent = array();
                                $brokenReferences = array();
 
+                               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
                                foreach ($refIndexRecords as $fileReferenceRow) {
                                        if ($fileReferenceRow['tablename'] === 'sys_file_reference') {
                                                $row = $this->transformFileReferenceToRecordReference($fileReferenceRow);
                                                $shortcutRecord = BackendUtility::getRecord($row['tablename'], $row['recuid']);
 
                                                if ($shortcutRecord) {
-                                                       $icon = IconUtility::getSpriteIconForRecord($row['tablename'], $shortcutRecord);
+                                                       $icon = $iconFactory->getIconForRecord($row['tablename'], $shortcutRecord, Icon::SIZE_SMALL)->render();
                                                        $tagParameters = array(
                                                                'class'           => 't3-js-clickmenutrigger',
                                                                'data-table'      => $row['tablename'],
index fe01972..f7ee73c 100644 (file)
@@ -12,7 +12,9 @@ return array(
                'versioningWS_alwaysAllowLiveEdit' => TRUE, // Only have LIVE records of file storages
                'enablecolumns' => array(),
                'requestUpdate' => 'driver',
-               'iconfile' => '_icon_ftp.gif',
+               'typeicon_classes' => array(
+                       'default' => 'mimetypes-x-sys_file_storage'
+               ),
                'searchFields' => 'name,description'
        ),
        'interface' => array(
index a9cb807..741ecfb 100644 (file)
@@ -13,7 +13,9 @@ return array(
                'enablecolumns' => array(
                        'disabled' => 'hidden'
                ),
-               'iconfile' => '_icon_ftp.gif',
+               'typeicon_classes' => array(
+                       'default' => 'mimetypes-x-sys_filemounts'
+               ),
                'useColumnsForDefaultValues' => 'path,base',
                'versioningWS_alwaysAllowLiveEdit' => TRUE,
                'searchFields' => 'title,path'
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-69754-TcaCtrlIconfileUsingRelativePathToExtAndFilenameOnly.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-69754-TcaCtrlIconfileUsingRelativePathToExtAndFilenameOnly.rst
new file mode 100644 (file)
index 0000000..e436dab
--- /dev/null
@@ -0,0 +1,72 @@
+=================================================================================================================
+Deprecation: #69754 - Deprecate relative path to extension directory and using filename only in TCA ctrl iconfile
+=================================================================================================================
+
+Description
+===========
+
+* Using relative paths to refer to the extension directory for iconfiles in ``TCA['ctrl']['iconfile']`` has been deprecated.
+* Using filenames only to refer to an iconfile in TCA['ctrl'] has been deprecated.
+
+
+Impact
+======
+
+* TCA definitions in ``TCA['ctrl']['iconfile']`` containing ``'../typo3conf/ext/'`` or calls to ``\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath()`` will trigger a message in the deprecation log.
+* TCA definitions in ``TCA['ctrl']['iconfile']`` containing a filename only will trigger a message in the deprecation log.
+
+
+Affected Installations
+======================
+
+Any installation with extensions defining ``TCA['ctrl']['iconfile']`` by using ``../typo3conf/ext/`` or  a filename only.
+
+
+Migration
+=========
+
+Relative paths
+--------------
+
+Use ``EXT:`` instead of relative path ``'../typo3conf/ext/'`` or ``\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath()``, e.g.
+
+.. code-block:: php
+
+       'ctrl' => array(
+               'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('my_extension') . 'Resources/Public/Icons/image.png'
+       ),
+
+has to be migrated to
+
+.. code-block:: php
+
+       'ctrl' => array(
+               'iconfile' => 'EXT:my_extension/Resources/Public/Icons/image.png'
+       ),
+
+File name only
+--------------
+
+Use a full absolute path or an ``EXT:`` definition instead of a filename only:
+
+.. code-block:: php
+
+       'ctrl' => array(
+               'iconfile' => '_icon_ftp.gif'
+       ),
+
+has to be migrated to
+
+.. code-block:: php
+
+       'ctrl' => array(
+               'iconfile' => 'EXT:t3skin/icons/gfx/i/_icon_ftp.gif'
+       ),
+
+or
+
+.. code-block:: php
+
+       'ctrl' => array(
+               'iconfile' => '/fileadmin/icons/_icon_ftp.gif'
+       ),
index 9a9df1d..e5393e1 100644 (file)
@@ -19,11 +19,6 @@ use TYPO3\CMS\Core\Imaging\Icon;
 use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Imaging\IconProvider\FontawesomeIconProvider;
 use TYPO3\CMS\Core\Resource\File;
-use TYPO3\CMS\Core\Resource\Folder;
-use TYPO3\CMS\Core\Resource\FolderInterface;
-use TYPO3\CMS\Core\Resource\InaccessibleFolder;
-use TYPO3\CMS\Core\Resource\ResourceStorage;
-use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 
 /**
  * TestCase for \TYPO3\CMS\Core\Imaging\IconFactory
@@ -274,10 +269,6 @@ class IconFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        $this->subject->getIconForFileExtension('png')->render());
        }
 
-       //
-       // Tests for getIconForResource
-       //
-
        /**
         * @test
         */
@@ -290,4 +281,9 @@ class IconFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
                        $this->subject->getIconForResource($resourceProphecy->reveal())->render());
        }
 
+       //
+       // Test for getIconForRecord
+       //
+
+
 }
index eac4c84..29cf82c 100644 (file)
@@ -26,11 +26,3 @@ if (TYPO3_MODE === 'BE') {
        $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['Extension Manager'][] =
                \TYPO3\CMS\Extensionmanager\Report\ExtensionStatus::class;
 }
-
-// Register specific icon for update script button
-\TYPO3\CMS\Backend\Sprite\SpriteManager::addSingleIcons(
-       array(
-               'update-script' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('extensionmanager') . 'Resources/Public/Images/Icons/ExtensionUpdateScript.png'
-       ),
-       'extensionmanager'
-);
index d3e28e3..7bd038e 100644 (file)
@@ -23,7 +23,6 @@ namespace TYPO3\CMS\Fluid\ViewHelpers\Be;
 
 use TYPO3\CMS\Backend\Template\DocumentTemplate;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
-use TYPO3\CMS\Backend\Utility\IconUtility;
 use TYPO3\CMS\Core\Imaging\Icon;
 use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
@@ -73,8 +72,10 @@ class PageInfoViewHelper extends AbstractBackendViewHelper implements Compilable
                // Add icon with clickmenu, etc:
                if ($pageRecord['uid']) {
                        // If there IS a real page
-                       $alttext = BackendUtility::getRecordIconAltText($pageRecord, 'pages');
-                       $theIcon = IconUtility::getSpriteIconForRecord('pages', $pageRecord, array('title' => htmlspecialchars($alttext)));
+                       $altText = BackendUtility::getRecordIconAltText($pageRecord, 'pages');
+                       /** @var IconFactory $iconFactory */
+                       $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+                       $theIcon = '<span title="' . $altText . '">' . $iconFactory->getIconForRecord('pages', $pageRecord, Icon::SIZE_SMALL)->render() . '</span>';
                        // Make Icon:
                        $theIcon = $doc->wrapClickMenuOnIcon($theIcon, 'pages', $pageRecord['uid']);
 
index 8347083..6de7469 100644 (file)
@@ -93,7 +93,7 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc
                        $tree->init('AND ' . $this->getBackendUser()->getPagePermsClause(1));
                        $tree->addField('l18n_cfg');
                        // Creating top icon; the current page
-                       $HTML = IconUtility::getSpriteIconForRecord('pages', $treeStartingRecord);
+                       $HTML = $this->iconFactory->getIconForRecord('pages', $treeStartingRecord, Icon::SIZE_SMALL)->render();
                        $tree->tree[] = array(
                                'row' => $treeStartingRecord,
                                'HTML' => $HTML
@@ -172,11 +172,7 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc
                                        if (is_array($row)) {
                                                $langRecUids[$langRow['uid']][] = $row['uid'];
                                                $status = $row['_HIDDEN'] ? (GeneralUtility::hideIfNotTranslated($data['row']['l18n_cfg']) || $data['row']['l18n_cfg'] & 1 ? 'danger' : '') : 'success';
-                                               $icon = IconUtility::getSpriteIconForRecord(
-                                                       'pages_language_overlay',
-                                                       $row,
-                                                       array('class' => 'c-recIcon')
-                                               );
+                                               $icon = $this->iconFactory->getIconForRecord('pages_language_overlay', $row, Icon::SIZE_SMALL)->render();
                                                $info = $icon . htmlspecialchars(
                                                                GeneralUtility::fixed_lgd_cs($row['title'], $titleLen)
                                                        ) . ((string)$row['nav_title'] !== '' ? ' [Nav: <em>' . htmlspecialchars(
@@ -382,4 +378,4 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc
                return $GLOBALS['BE_USER'];
        }
 
-}
\ No newline at end of file
+}
index a1864cf..f34ce6f 100644 (file)
@@ -14,7 +14,9 @@ return array(
                'enablecolumns' => array(
                        'disabled' => 'hidden'
                ),
-               'iconfile' => 'backend_layout.gif',
+               'typeicon_classes' => array(
+                       'default' => 'mimetypes-x-backend_layout'
+               ),
                'selicon_field' => 'icon',
                'selicon_field_path' => 'uploads/media',
                'thumbnail' => 'resources'
index 43ae0fc..63adbb8 100644 (file)
@@ -370,7 +370,7 @@ class ImportExportController extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
                                        $pid = $inData['pagetree']['id'];
                                        $tree = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Tree\View\PageTreeView::class);
                                        $tree->init('AND ' . $this->perms_clause . $this->filterPageIds($this->export->excludeMap));
-                                       $HTML = IconUtility::getSpriteIconForRecord('pages', $sPage);
+                                       $HTML = $this->iconFactory->getIconForRecord('pages', $sPage, Icon::SIZE_SMALL)->render();
                                        $tree->tree[] = array('row' => $sPage, 'HTML' => $HTML);
                                        $tree->buffer_idH = array();
                                        if ($inData['pagetree']['levels'] > 0) {
@@ -660,7 +660,7 @@ class ImportExportController extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
                                $row[] = '
                                <tr class="bgColor4">
                                        <td><strong>' . $this->lang->getLL('makeconfig_record', TRUE) . '</strong></td>
-                                       <td>' . IconUtility::getSpriteIconForRecord($tName, $rec) . BackendUtility::getRecordTitle($tName, $rec, TRUE)
+                                       <td>' . $this->iconFactory->getIconForRecord($tName, $rec, Icon::SIZE_SMALL)->render() . BackendUtility::getRecordTitle($tName, $rec, TRUE)
                                                . '<input type="hidden" name="tx_impexp[record][]" value="' . htmlspecialchars(($tName . ':' . $rUid)) . '" /></td>
                                </tr>';
                        }
@@ -683,7 +683,7 @@ class ImportExportController extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
                                                $iconAndTitle = $this->iconFactory->getIcon('apps-pagetree-root', Icon::SIZE_SMALL) . $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'];
                                        } else {
                                                $record = BackendUtility::getRecordWSOL('pages', $referenceParts[1]);
-                                               $iconAndTitle = IconUtility::getSpriteIconForRecord('pages', $record)
+                                               $iconAndTitle = $this->iconFactory->getIconForRecord('pages', $record, Icon::SIZE_SMALL)->render()
                                                        . BackendUtility::getRecordTitle('pages', $record, TRUE);
                                        }
                                        $tblList .= 'Table "' . $tableName . '" from ' . $iconAndTitle
index 110b4d9..a91edd7 100644 (file)
@@ -3649,7 +3649,10 @@ class ImportExport {
                                        }
                                }
                        }
-                       $pInfo['preCode'] = $preCode . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord($table, (array)$this->dat['records'][($table . ':' . $uid)]['data'], array('title' => htmlspecialchars(($table . ':' . $uid))));
+                       $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+                       $pInfo['preCode'] = $preCode . '<span title="' . htmlspecialchars($table . ':' . $uid) . '">'
+                               . $iconFactory->getIconForRecord($table, (array)$this->dat['records'][($table . ':' . $uid)]['data'], Icon::SIZE_SMALL)->render()
+                               . '</span>';
                        $pInfo['title'] = htmlspecialchars($record['title']);
                        // View page:
                        if ($table === 'pages') {
index 8e634f1..6f1db1b 100644 (file)
@@ -14,6 +14,9 @@ namespace TYPO3\CMS\Impexp\View;
  * The TYPO3 project - inspiring people to share!
  */
 use TYPO3\CMS\Backend\Utility\IconUtility;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
  * Extension of the page tree class. Used to get the tree of pages to export.
@@ -85,7 +88,8 @@ class ExportPageTreeView extends \TYPO3\CMS\Backend\Tree\View\BrowseTreeView {
                $this->ids = $curIds;
                if ($pid > 0) {
                        $rootRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordWSOL('pages', $pid);
-                       $firstHtml = IconUtility::getSpriteIconForRecord('pages', $rootRec);
+                       $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+                       $firstHtml = $iconFactory->getIconForRecord('pages', $rootRec, Icon::SIZE_SMALL)->render();
                } else {
                        $rootRec = array(
                                'title' => $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'],
index 0925dbd..0eaa203 100644 (file)
@@ -21,6 +21,8 @@ use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Core\Cache\CacheManager;
 use TYPO3\CMS\Core\Cache\Frontend\FrontendInterface;
 use TYPO3\CMS\Core\DataHandling\DataHandler;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Dbal\Database\DatabaseConnection;
@@ -335,7 +337,8 @@ class AdministrationRepository {
                $tree = GeneralUtility::makeInstance(PageTreeView::class);
                $perms_clause = $this->getBackendUserAuthentication()->getPagePermsClause(1);
                $tree->init('AND ' . $perms_clause);
-               $HTML = IconUtility::getSpriteIconForRecord('pages', $pageRecord, array('title' => $pageRecord['title']));
+               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+               $HTML = '<span title="' . htmlspecialchars($pageRecord['title']) . '">' . $iconFactory->getIconForRecord('pages', $pageRecord, Icon::SIZE_SMALL)->render() . '</span>';
                $tree->tree[] = array(
                        'row' => $pageRecord,
                        'HTML' => $HTML
index 43e4762..2f95f4e 100644 (file)
@@ -13,7 +13,9 @@ return array(
                        'disabled' => 'hidden',
                        'starttime' => 'starttime'
                ),
-               'iconfile' => 'default.gif'
+               'typeicon_classes' => array(
+                       'default' => 'mimetypes-x-index_config'
+               )
        ),
        'interface' => array(
                'showRecordFieldList' => 'hidden,starttime,title,description,type,depth,table2index,alternative_source_pid,get_params,chashcalc,filepath,extensions'
index f7dd4ba..83c4f99 100644 (file)
@@ -321,6 +321,7 @@ class InfoPageTyposcriptConfigController extends \TYPO3\CMS\Backend\Module\Abstr
                        return $lines;
                }
 
+               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
                foreach ($pageArray as $identifier => $_) {
                        if (!MathUtility::canBeInterpretedAsInteger($identifier)) {
                                continue;
@@ -331,21 +332,16 @@ class InfoPageTyposcriptConfigController extends \TYPO3\CMS\Backend\Module\Abstr
                                        <td nowrap style="' . $cellStyle . '">
                                                <a href="'
                                        . htmlspecialchars(GeneralUtility::linkThisScript(array('id' => $identifier)))
-                                       . '">'
-                                       . IconUtility::getSpriteIconForRecord(
-                                               'pages',
-                                               BackendUtility::getRecordWSOL('pages', $identifier), array('title' => ('ID: ' . $identifier))
-                                       )
+                                       . '" title="' . htmlspecialchars('ID: ' . $identifier) . '">'
+                                       . $iconFactory->getIconForRecord('pages', BackendUtility::getRecordWSOL('pages', $identifier), Icon::SIZE_SMALL)->render()
                                        . GeneralUtility::fixed_lgd_cs($pageArray[$identifier], 30) . '</a></td>
                                        <td>' . ($pageArray[($identifier . '_')]['includeLines'] === 0 ? '' : $pageArray[($identifier . '_')]['includeLines']) . '</td>
                                        <td>' . ($pageArray[$identifier . '_']['writtenLines'] === 0 ? '' : $pageArray[$identifier . '_']['writtenLines']) . '</td>
                                        </tr>';
                        } else {
                                $lines[] = '<tr>
-                                       <td nowrap style="' . $cellStyle . '">
-                                       ' . IconUtility::getSpriteIconForRecord(
-                                               'pages',
-                                               BackendUtility::getRecordWSOL('pages', $identifier))
+                                       <td nowrap style="' . $cellStyle . '">'
+                                       . $iconFactory->getIconForRecord('pages', BackendUtility::getRecordWSOL('pages', $identifier), Icon::SIZE_SMALL)->render()
                                        . GeneralUtility::fixed_lgd_cs($pageArray[$identifier], 30) . '</td>
                                        <td></td>
                                        <td></td>
index c637250..29465b9 100644 (file)
@@ -498,11 +498,8 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
                // Fallback, if there is no label
                $fieldName = !empty($fieldName) ? $fieldName : $row['field'];
                // column "Element"
-               $element = IconUtility::getSpriteIconForRecord(
-                       $table,
-                       $row,
-                       array('title' => $table . ':' . $row['record_uid'])
-               );
+               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+               $element = '<span title="' . htmlspecialchars($table . ':' . $row['record_uid']) . '">' . $iconFactory->getIconForRecord($table, $row, Icon::SIZE_SMALL)->render() . '</span>';
                $element .= $elementHeadline;
                $element .= ' ' . sprintf($this->getLanguageService()->getLL('list.field'), $fieldName);
                $markerArray['actionlink'] = $actionLink;
index df3aa75..d8dfde6 100644 (file)
@@ -342,6 +342,7 @@ class DatabaseIntegrityView extends BaseScriptClass {
         * @return void
         */
        public function func_records() {
+               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
 
                /** @var $admin DatabaseIntegrityCheck */
                $admin = GeneralUtility::makeInstance(DatabaseIntegrityCheck::class);
@@ -350,15 +351,15 @@ class DatabaseIntegrityView extends BaseScriptClass {
                // Pages stat
                $pageStatistic = array(
                        'total_pages' => array(
-                               'icon' => IconUtility::getSpriteIconForRecord('pages', array()),
+                               'icon' => $iconFactory->getIconForRecord('pages', array(), Icon::SIZE_SMALL)->render(),
                                'count' => count($admin->page_idArray)
                        ),
                        'hidden_pages' => array(
-                               'icon' => IconUtility::getSpriteIconForRecord('pages', array('hidden' => 1)),
+                               'icon' => $iconFactory->getIconForRecord('pages', array('hidden' => 1), Icon::SIZE_SMALL)->render(),
                                'count' => $admin->recStats['hidden']
                        ),
                        'deleted_pages' => array(
-                               'icon' => IconUtility::getSpriteIconForRecord('pages', array('deleted' => 1)),
+                               'icon' => $iconFactory->getIconForRecord('pages', array('deleted' => 1), Icon::SIZE_SMALL)->render(),
                                'count' => count($admin->recStats['deleted']['pages'])
                        )
                );
@@ -372,7 +373,7 @@ class DatabaseIntegrityView extends BaseScriptClass {
                        foreach ($doktype as $setup) {
                                if ($setup[1] != '--div--') {
                                        $doktypes[] = array(
-                                               'icon' => IconUtility::getSpriteIconForRecord('pages', array('doktype' => $setup[1])),
+                                               'icon' => $iconFactory->getIconForRecord('pages', array('doktype' => $setup[1]), Icon::SIZE_SMALL)->render(),
                                                'title' => $lang->sL($setup[0]) . ' (' . $setup[1] . ')',
                                                'count' => (int)$admin->recStats['doktype'][$setup[1]]
                                        );
@@ -420,7 +421,7 @@ class DatabaseIntegrityView extends BaseScriptClass {
                                        }
                                }
                                $tableStatistic[$t] = array(
-                                       'icon' => IconUtility::getSpriteIconForRecord($t, array()),
+                                       'icon' => $iconFactory->getIconForRecord($t, array(), Icon::SIZE_SMALL)->render(),
                                        'title' => $lang->sL($GLOBALS['TCA'][$t]['ctrl']['title']),
                                        'count' => $theNumberOfRe,
                                        'lostRecords' => $lr
index 527816a..5f20526 100644 (file)
@@ -143,7 +143,7 @@ class OpendocsToolbarItem implements ToolbarItemInterface {
                        return '';
                }
                $label = htmlspecialchars(strip_tags(htmlspecialchars_decode($document[0])));
-               $icon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord($table, $record);
+               $icon = $this->iconFactory->getIconForRecord($table, $record, Icon::SIZE_SMALL)->render();
                $link = \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('record_edit') . '&' . $document[2];
                $pageId = (int)$document[3]['uid'];
                if ($document[3]['table'] !== 'pages') {
index d14b031..1522a7d 100755 (executable)
@@ -1615,8 +1615,8 @@ class ElementBrowser {
                                <ul class="list-tree list-tree-root list-tree-root-clean">
                                        <li class="list-tree-control-open">
                                                <span class="list-tree-group">
-                                                       <span class="list-tree-icon">' . IconUtility::getSpriteIconForRecord('pages', $mainPageRec) . '</span>
-                                                       <span class="list-tree-title">' . BackendUtility::getRecordTitle('pages', $mainPageRec, TRUE) . '</span>
+                                                       <span class="list-tree-icon">' . $this->iconFactory->getIconForRecord('pages', $mainPageRec, Icon::SIZE_SMALL)->render() . '</span>
+                                                       <span class="list-tree-title">' . htmlspecialchars(BackendUtility::getRecordTitle('pages', $mainPageRec, TRUE)) . '</span>
                                                </span>
                                                <ul>
                                ';
@@ -1634,7 +1634,7 @@ class ElementBrowser {
                        $c = 0;
                        while ($row = $db->sql_fetch_assoc($res)) {
                                $c++;
-                               $icon = IconUtility::getSpriteIconForRecord('tt_content', $row);
+                               $icon = $this->iconFactory->getIconForRecord('tt_content', $row, Icon::SIZE_SMALL)->render();
                                $selected = '';
                                if ($this->curUrlInfo['act'] == 'page' && $this->curUrlInfo['cElement'] == $row['uid']) {
                                        $selected = ' class="active"';
@@ -1648,7 +1648,7 @@ class ElementBrowser {
                                                        </span>
                                                        <span class="list-tree-title">
                                                                <a href="#" onclick="return link_typo3Page(\'' . $expPageId . '\',\'#' . $row['uid'] . '\');">
-                                                                       ' . BackendUtility::getRecordTitle('tt_content', $row, TRUE) . '
+                                                                       ' . htmlspecialchars(BackendUtility::getRecordTitle('tt_content', $row, TRUE)) . '
                                                                </a>
                                                        </span>
                                                </span>
@@ -1696,7 +1696,7 @@ class ElementBrowser {
                $ATag2 = '';
                $picon = '';
                if (is_array($mainPageRec)) {
-                       $picon = IconUtility::getSpriteIconForRecord('pages', $mainPageRec);
+                       $picon = $this->iconFactory->getIconForRecord('pages', $mainPageRec, Icon::SIZE_SMALL)->render();
                        if (in_array('pages', $tablesArr)) {
                                $ATag = '<a href="#" onclick="return insertElement(\'pages\', \'' . $mainPageRec['uid'] . '\', \'db\', '
                                        . GeneralUtility::quoteJSvalue($mainPageRec['title']) . ', \'\', \'\', \'\',\'\',1);">';
index b17727d..f70b478 100644 (file)
@@ -738,12 +738,11 @@ class DatabaseRecordList extends AbstractDatabaseRecordList {
                // Incr. counter.
                $this->counter++;
                // The icon with link
-               $altText = htmlspecialchars(BackendUtility::getRecordIconAltText($row, $table));
-               $iconImg = IconUtility::getSpriteIconForRecord(
-                       $table,
-                       $row,
-                       array('title' => $altText, 'style' => $indent ? ' margin-left: ' . $indent . 'px;' : '')
-               );
+               $altText = BackendUtility::getRecordIconAltText($row, $table);
+               $additionalStyle = $indent ? ' style="margin-left: ' . $indent . 'px;"' : '';
+               $iconImg = '<span title="' . $altText . '" ' . $additionalStyle . '>'
+                       . $this->iconFactory->getIconForRecord($table, $row, Icon::SIZE_SMALL)->render()
+                       . '</span>';
                $theIcon = $this->clickMenuEnabled ? $this->getModule()->doc->wrapClickMenuOnIcon($iconImg, $table, $row['uid']) : $iconImg;
                // Preparing and getting the data-array
                $theData = array();
index 58e2771..8819a96 100644 (file)
@@ -15,6 +15,8 @@ namespace TYPO3\CMS\Recordlist\Tree\View;
  */
 
 use TYPO3\CMS\Backend\Utility\IconUtility;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -43,7 +45,8 @@ class ElementBrowserPageTreeView extends \TYPO3\CMS\Backend\Tree\View\ElementBro
         */
        public function wrapTitle($title, $v, $ext_pArrPages) {
                if ($ext_pArrPages) {
-                       $ficon = IconUtility::getSpriteIconForRecord('pages', $v);
+                       $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+                       $ficon = $iconFactory->getIconForRecord('pages', $v, Icon::SIZE_SMALL)->render();
                        $onClick = 'return insertElement(\'pages\', \'' . $v['uid'] . '\', \'db\', ' . GeneralUtility::quoteJSvalue($v['title']) . ', \'\', \'\', ' . GeneralUtility::quoteJSvalue($ficon) . ',\'\',1);';
                } else {
                        $onClick = 'return jumpToUrl(' . GeneralUtility::quoteJSvalue($this->getThisScript() . 'act=' . $this->elementBrowser->act . '&mode=' . $this->elementBrowser->mode . '&expandPage=' . $v['uid']) . ');';
index 1e1806e..33939b9 100644 (file)
@@ -17,6 +17,8 @@ namespace TYPO3\CMS\Recycler\Controller;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\Utility\IconUtility;
 use TYPO3\CMS\Core\DataHandling\DataHandler;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Recycler\Utility\RecyclerUtility;
 
@@ -56,6 +58,7 @@ class DeletedRecordsController {
                if (is_array($deletedRowsArray)) {
                        $lang = $this->getLanguageService();
                        $backendUser = $this->getBackendUser();
+                       $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
 
                        foreach ($deletedRowsArray as $table => $rows) {
                                $total += count($deletedRowsArray[$table]);
@@ -65,7 +68,7 @@ class DeletedRecordsController {
                                        $jsonArray['rows'][] = array(
                                                'uid' => $row['uid'],
                                                'pid' => $row['pid'],
-                                               'icon' => IconUtility::getSpriteIconForRecord($table, $row),
+                                               'icon' => $iconFactory->getIconForRecord($table, $row, Icon::SIZE_SMALL)->render(),
                                                'pageTitle' => RecyclerUtility::getUtf8String($pageTitle),
                                                'table' => $table,
                                                'crdate' => BackendUtility::datetime($row[$GLOBALS['TCA'][$table]['ctrl']['crdate']]),
index 3aecab6..776b112 100644 (file)
@@ -11,7 +11,9 @@ return array(
                        'starttime' => 'starttime',
                        'endtime' => 'endtime'
                ),
-               'iconfile' => 'EXT:rtehtmlarea/Resources/Public/Images/Plugins/Abbreviation/abbreviation.gif'
+               'typeicon_classes' => array(
+                       'default' => 'mimetypes-x-tx_rtehtmlarea_acronym'
+               )
        ),
        'interface' => array(
                'showRecordFieldList' => 'hidden,sys_language_uid,term,acronym'
index 4e32637..f12163c 100644 (file)
@@ -8,7 +8,9 @@ return array(
                'cruser_id' => 'cruser_id',
                'delete' => 'deleted',
                'sortby' => 'sorting',
-               'iconfile' => 'EXT:scheduler/ext_icon.png',
+               'typeicon_classes' => array(
+                       'default' => 'mimetypes-x-tx_scheduler_task_group'
+               ),
                'adminOnly' => 1, // Only admin users can edit
                'rootLevel' => 1,
                'enablecolumns' => array(
@@ -50,4 +52,4 @@ return array(
                        'showitem' => 'hidden, groupName, description',
                ),
        ),
-);
\ No newline at end of file
+);
index c9fe780..85df99a 100644 (file)
@@ -27,11 +27,3 @@ if (TYPO3_MODE === 'BE') {
                'EXT:scheduler/Resources/Private/Language/locallang_csh_scheduler.xlf'
        );
 }
-
-// Register specific icon for run task button
-\TYPO3\CMS\Backend\Sprite\SpriteManager::addSingleIcons(
-       array(
-               'run-task' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('scheduler') . 'Resources/Public/Images/Icons/RunTask.png'
-       ),
-       'scheduler'
-);
index 18a87c3..d770102 100644 (file)
@@ -382,7 +382,7 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
                $res = $this->getDatabaseConnection()->exec_SELECTquery('*', 'be_users', 'cruser_id=' . $this->getBackendUser()->user['uid'] . ' AND createdByAction=' . (int)$action['uid'] . BackendUtility::deleteClause('be_users'), '', 'username');
                // Render the user records
                while ($row = $this->getDatabaseConnection()->sql_fetch_assoc($res)) {
-                       $icon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('be_users', $row, array('title' => 'uid=' . $row['uid']));
+                       $icon = '<span title="' . htmlspecialchars('uid=' . $row['uid']) . '">' . $this->iconFactory->getIconForRecord('be_users', $row, Icon::SIZE_SMALL)->render() . '</span>';
                        $line = $icon . $this->action_linkUserName($row['username'], $row['realName'], $action['uid'], $row['uid']);
                        // Selected user
                        if ($row['uid'] == $selectedUser) {
@@ -685,7 +685,7 @@ class ActionTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
                                'description' => BackendUtility::getRecordTitle($el['table'], $dbAnalysis->results[$el['table']][$el['id']]),
                                'descriptionHtml' => $description,
                                'link' => $link,
-                               'icon' => \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord($el['table'], $dbAnalysis->results[$el['table']][$el['id']], array('title' => htmlspecialchars($path)))
+                               'icon' => '<span title="' . htmlspecialchars($path) . '">' . $this->iconFactory->getIconForRecord($el['table'], $dbAnalysis->results[$el['table']][$el['id']], Icon::SIZE_SMALL)->render() . '</span>'
                        );
                }
                // Render the record list
index 988c1a3..4429fac 100644 (file)
@@ -98,11 +98,12 @@ class ActionToolbarItem implements ToolbarItemInterface {
                }
 
                if ($queryResource) {
+                       $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
                        while ($actionRow = $databaseConnection->sql_fetch_assoc($queryResource)) {
                                $actions[] = array(
                                        $actionRow['title'],
                                        BackendUtility::getModuleUrl('user_task') . '&SET[mode]=tasks&SET[function]=sys_action.TYPO3\\CMS\\SysAction\\ActionTask&show=' . $actionRow['uid'],
-                                       IconUtility::getSpriteIconForRecord('sys_action', $actionRow)
+                                       $iconFactory->getIconForRecord('sys_action', $actionRow, Icon::SIZE_SMALL)->render()
                                );
                        }
                        $databaseConnection->sql_free_result($queryResource);
index a6ab083..3eec17d 100644 (file)
@@ -19,8 +19,7 @@ return array(
                'typeicon_classes' => array(
                        'default' => 'mimetypes-x-sys_action'
                ),
-               'type' => 'type',
-               'iconfile' => 'EXT:sys_action/Resources/Public/Images/x-sys_action.png',
+               'type' => 'type'
        ),
        'interface' => array(
                'showRecordFieldList' => 'hidden,title,type,description,assign_to_groups'
index ed440c5..76eb020 100644 (file)
Binary files a/typo3/sysext/sys_action/Resources/Public/Images/x-sys_action.png and b/typo3/sysext/sys_action/Resources/Public/Images/x-sys_action.png differ
index 85fbf58..8de43ac 100644 (file)
@@ -9,8 +9,10 @@ return array(
                'prependAtCopy' => 'LLL:EXT:lang/locallang_general.xlf:LGL.prependAtCopy',
                'delete' => 'deleted',
                'title' => 'LLL:EXT:sys_note/Resources/Private/Language/locallang_tca.xlf:sys_note',
-               'iconfile' => 'EXT:sys_note/ext_icon.png',
-               'sortby' => 'sorting',
+               'typeicon_classes' => array(
+                       'default' => 'mimetypes-x-sys_note'
+               ),
+               'sortby' => 'sorting'
        ),
        'interface' => array(
                'showRecordFieldList' => 'category,subject,message,personal'
diff --git a/typo3/sysext/t3skin/images/icons/mimetypes/x-sys_action.png b/typo3/sysext/t3skin/images/icons/mimetypes/x-sys_action.png
deleted file mode 100644 (file)
index 76eb020..0000000
Binary files a/typo3/sysext/t3skin/images/icons/mimetypes/x-sys_action.png and /dev/null differ
index f226819..e370145 100644 (file)
@@ -17,6 +17,8 @@ namespace TYPO3\CMS\Tstemplate\Controller;
 use TYPO3\CMS\Backend\Module\AbstractFunctionModule;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\Utility\IconUtility;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\TypoScript\ExtendedTemplateService;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Frontend\Page\PageRepository;
@@ -110,9 +112,10 @@ class TemplateAnalyzerModuleFunctionController extends AbstractFunctionModule {
                $lang = $this->getLanguageService();
                if ($existTemplate) {
                        $siteTitle = trim($GLOBALS['tplRow']['sitetitle']);
+                       $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
                        $theOutput .= $this->pObj->doc->section(
                                $lang->getLL('currentTemplate', TRUE),
-                               IconUtility::getSpriteIconForRecord('sys_template', $GLOBALS['tplRow'])
+                               $iconFactory->getIconForRecord('sys_template', $GLOBALS['tplRow'], Icon::SIZE_SMALL)->render()
                                        . '<strong>' . $this->pObj->linkWrapTemplateTitle($GLOBALS['tplRow']['title']) . '</strong>'
                                        . htmlspecialchars($siteTitle ? ' (' . $siteTitle . ')' : '')
                        );
index 1d05324..8586d28 100644 (file)
@@ -18,6 +18,8 @@ use TYPO3\CMS\Backend\Module\AbstractFunctionModule;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\Utility\IconUtility;
 use TYPO3\CMS\Core\DataHandling\DataHandler;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\TypoScript\ExtendedTemplateService;
 use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
@@ -149,7 +151,8 @@ class TypoScriptTemplateConstantEditorModuleFunctionController extends AbstractF
                        $this->pObj->MOD_MENU['constant_editor_cat'] = $templateService->ext_getCategoryLabelArray();
                        $this->pObj->MOD_SETTINGS = BackendUtility::getModuleData($this->pObj->MOD_MENU, GeneralUtility::_GP('SET'), $this->pObj->MCONF['name']);
                        // Resetting the menu (stop)
-                       $content = IconUtility::getSpriteIconForRecord('sys_template', $tplRow) . '<strong>' . $this->pObj->linkWrapTemplateTitle($tplRow['title'], 'constants') . '</strong>' . htmlspecialchars((trim($tplRow['sitetitle']) ? ' (' . $tplRow['sitetitle'] . ')' : ''));
+                       $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+                       $content = $iconFactory->getIconForRecord('sys_template', $tplRow, Icon::SIZE_SMALL)->render() . '<strong>' . $this->pObj->linkWrapTemplateTitle($tplRow['title'], 'constants') . '</strong>' . (trim($tplRow['sitetitle']) ? htmlspecialchars(' (' . $tplRow['sitetitle'] . ')') : '');
                        $theOutput .= $this->pObj->doc->section($lang->getLL('editConstants', TRUE), $content, FALSE, TRUE);
                        if ($manyTemplatesMenu) {
                                $theOutput .= $this->pObj->doc->section('', $manyTemplatesMenu);
index 3912a70..2f36769 100644 (file)
@@ -252,7 +252,8 @@ class TypoScriptTemplateInformationModuleFunctionController extends AbstractFunc
                                        }
                                }
                        }
-                       $content = '<a href="#" class="t3-js-clickmenutrigger" data-table="sys_template" data-uid="' . $tplRow['uid'] . '" data-listframe="1">' . IconUtility::getSpriteIconForRecord('sys_template', $tplRow) . '</a><strong>' . htmlspecialchars($tplRow['title']) . '</strong>' . htmlspecialchars((trim($tplRow['sitetitle']) ? ' (' . $tplRow['sitetitle'] . ')' : ''));
+                       $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+                       $content = '<a href="#" class="t3-js-clickmenutrigger" data-table="sys_template" data-uid="' . $tplRow['uid'] . '" data-listframe="1">' . $iconFactory->getIconForRecord('sys_template', $tplRow, Icon::SIZE_SMALL)->render() . '</a><strong>' . htmlspecialchars($tplRow['title']) . '</strong>' . (trim($tplRow['sitetitle']) ? htmlspecialchars(' (' . $tplRow['sitetitle'] . ')') : '');
                        $theOutput .= $this->pObj->doc->section($lang->getLL('templateInformation'), $content, 0, 1);
                        if ($manyTemplatesMenu) {
                                $theOutput .= $this->pObj->doc->section('', $manyTemplatesMenu);
index 446ae92..b560b3d 100755 (executable)
@@ -590,14 +590,14 @@ page.10.value = HELLO WORLD!
                        if (MathUtility::canBeInterpretedAsInteger($k)) {
                                if (isset($pArray[$k . '_'])) {
                                        $lines[] = '<tr class="' . ($i++ % 2 == 0 ? 'bgColor4' : 'bgColor6') . '">
-                                               <td nowrap><span style="width: 1px; height: 1px; display:inline-block; margin-left: ' . $c * 20 . 'px"></span>' . '<a href="' . htmlspecialchars(GeneralUtility::linkThisScript(array('id' => $k))) . '">' . IconUtility::getSpriteIconForRecord('pages', BackendUtility::getRecordWSOL('pages', $k), array('title' => ('ID: ' . $k))) . GeneralUtility::fixed_lgd_cs($pArray[$k], 30) . '</a></td>
+                                               <td nowrap><span style="width: 1px; height: 1px; display:inline-block; margin-left: ' . $c * 20 . 'px"></span>' . '<a href="' . htmlspecialchars(GeneralUtility::linkThisScript(array('id' => $k))) . '" title="' . htmlspecialchars('ID: ' . $k) . '">' . $this->iconFactory->getIconForRecord('pages', BackendUtility::getRecordWSOL('pages', $k), Icon::SIZE_SMALL)->render() . GeneralUtility::fixed_lgd_cs($pArray[$k], 30) . '</a></td>
                                                <td>' . $pArray[($k . '_')]['count'] . '</td>
                                                <td>' . ($pArray[$k . '_']['root_max_val'] > 0 ? $statusCheckedIcon : '&nbsp;') . '</td>
                                                <td>' . ($pArray[$k . '_']['root_min_val'] == 0 ? $statusCheckedIcon : '&nbsp;') . '</td>
                                                </tr>';
                                } else {
                                        $lines[] = '<tr class="' . ($i++ % 2 == 0 ? 'bgColor4' : 'bgColor6') . '">
-                                               <td nowrap><span style="width: 1px; height: 1px; display:inline-block; margin-left: ' . $c * 20 . 'px"></span>' . IconUtility::getSpriteIconForRecord('pages', BackendUtility::getRecordWSOL('pages', $k)) . GeneralUtility::fixed_lgd_cs($pArray[$k], 30) . '</td>
+                                               <td nowrap><span style="width: 1px; height: 1px; display:inline-block; margin-left: ' . $c * 20 . 'px"></span>' . $this->iconFactory->getIconForRecord('pages', BackendUtility::getRecordWSOL('pages', $k), Icon::SIZE_SMALL)->render() . GeneralUtility::fixed_lgd_cs($pArray[$k], 30) . '</td>
                                                <td></td>
                                                <td></td>
                                                <td></td>
index 8d66b10..0ad85b8 100644 (file)
@@ -18,6 +18,8 @@ use TYPO3\CMS\Backend\Module\AbstractFunctionModule;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\Utility\IconUtility;
 use TYPO3\CMS\Core\DataHandling\DataHandler;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Messaging\FlashMessageService;
 use TYPO3\CMS\Core\TypoScript\ExtendedTemplateService;
@@ -221,9 +223,10 @@ class TypoScriptTemplateObjectBrowserModuleFunctionController extends AbstractFu
                // initialize
                $theOutput = '';
                if ($existTemplate) {
-                       $content = ' ' . IconUtility::getSpriteIconForRecord('sys_template', $tplRow) . ' <strong>'
+                       $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+                       $content = ' ' . $iconFactory->getIconForRecord('sys_template', $tplRow, Icon::SIZE_SMALL)->render() . ' <strong>'
                                . $this->pObj->linkWrapTemplateTitle($tplRow['title'], ($bType == 'setup' ? 'config' : 'constants')) . '</strong>'
-                               . htmlspecialchars(trim($tplRow['sitetitle']) ? ' (' . $tplRow['sitetitle'] . ')' : '');
+                               . (trim($tplRow['sitetitle']) ? htmlspecialchars(' (' . $tplRow['sitetitle'] . ')') : '');
                        $theOutput .= $this->pObj->doc->section($lang->getLL('currentTemplate'), $content);
                        if ($manyTemplatesMenu) {
                                $theOutput .= $this->pObj->doc->section('', $manyTemplatesMenu);
index 3108715..dc0ce98 100644 (file)
@@ -358,14 +358,14 @@ class VersionModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
                        $adminLinks = $this->adminLinks($this->table, $row);
                        $content .= '
                                <tr' . ($row['uid'] != $this->uid ? '' : ' class="active"') . '>
-                                       <td  class="col-icon">' .
+                                       <td class="col-icon">' .
                                                ($row['uid'] != $this->uid ?
                                                        '<a href="' . $this->doc->issueCommand('&cmd[' . $this->table . '][' . $this->uid . '][version][swapWith]=' . $row['uid'] . '&cmd[' . $this->table . '][' . $this->uid . '][version][action]=swap') . '" title="' . $GLOBALS['LANG']->getLL('swapWithCurrent', TRUE) . '">' . $this->iconFactory->getIcon('actions-version-swap-version', Icon::SIZE_SMALL) . '</a>' :
                                                        '<span title="' . $GLOBALS['LANG']->getLL('currentOnlineVersion', TRUE) . '">' . $this->iconFactory->getIcon('status-status-current', Icon::SIZE_SMALL) . '</span>'
                                                ) . '
                                        </td>
-                                       <td  class="col-icon">' . IconUtility::getSpriteIconForRecord($this->table, $row) . '</td>
-                                       <td>' . BackendUtility::getRecordTitle($this->table, $row, TRUE) . '</td>
+                                       <td class="col-icon">' . $this->iconFactory->getIconForRecord($this->table, $row, Icon::SIZE_SMALL)->render() . '</td>
+                                       <td>' . htmlspecialchars(BackendUtility::getRecordTitle($this->table, $row, TRUE)) . '</td>
                                        <td>' . $row['uid'] . '</td>
                                        <td>' . $row['t3ver_oid'] . '</td>
                                        <td>' . $row['t3ver_id'] . '</td>
@@ -445,7 +445,7 @@ class VersionModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
                                $content .= '
                                        <table class="table">
                                                <tr>
-                                                       <th class="col-icon">' . IconUtility::getSpriteIconForRecord($table, array()) . '</th>
+                                                       <th class="col-icon">' . $this->iconFactory->getIconForRecord($table, array(), Icon::SIZE_SMALL)->render() . '</th>
                                                        <th class="col-title">' . $GLOBALS['LANG']->sL($GLOBALS['TCA'][$table]['ctrl']['title'], TRUE) . '</th>
                                                        <th></th>
                                                        <th></th>
@@ -454,8 +454,8 @@ class VersionModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
                                        $ownVer = $this->lookForOwnVersions($table, $subrow['uid']);
                                        $content .= '
                                                <tr>
-                                                       <td class="col-icon">' . IconUtility::getSpriteIconForRecord($table, $subrow) . '</td>
-                                                       <td class="col-title">' . BackendUtility::getRecordTitle($table, $subrow, TRUE) . '</td>
+                                                       <td class="col-icon">' . $this->iconFactory->getIconForRecord($table, $subrow, Icon::SIZE_SMALL)->render() . '</td>
+                                                       <td class="col-title">' . htmlspecialchars(BackendUtility::getRecordTitle($table, $subrow, TRUE)) . '</td>
                                                        <td>' . ($ownVer > 1 ? '<a href="' . htmlspecialchars(BackendUtility::getModuleUrl('web_txversionM1', array('table' => $table, 'uid' => $subrow['uid']))) . '">' . ($ownVer - 1) . '</a>' : '') . '</td>
                                                        <td class="col-control">' . $this->adminLinks($table, $subrow) . '</td>
                                                </tr>';
index 257c876..f57adde 100644 (file)
@@ -16,6 +16,8 @@ namespace TYPO3\CMS\WizardCrpages\Controller;
 
 use TYPO3\CMS\Backend\Utility\IconUtility;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Frontend\Page\PageRepository;
@@ -108,10 +110,11 @@ class CreatePagesWizardModuleFunctionController extends \TYPO3\CMS\Backend\Modul
                                // Display result:
                                $menuItems = $pageRepository->getMenu($this->pObj->id, '*', 'sorting', '', FALSE);
                                $lines = array();
+                               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
                                foreach ($menuItems as $record) {
                                        BackendUtility::workspaceOL('pages', $record);
                                        if (is_array($record)) {
-                                               $lines[] = '<span class="text-nowrap">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('pages', $record, array('title' => BackendUtility::titleAttribForPages($record, '', FALSE))) . htmlspecialchars(GeneralUtility::fixed_lgd_cs($record['title'], $this->getBackendUser()->uc['titleLen'])) . '</span>';
+                                               $lines[] = '<span class="text-nowrap" title="' . BackendUtility::titleAttribForPages($record, '', FALSE) . '">' . $iconFactory->getIconForRecord('pages', $record, Icon::SIZE_SMALL)->render() . htmlspecialchars(GeneralUtility::fixed_lgd_cs($record['title'], $this->getBackendUser()->uc['titleLen'])) . '</span>';
                                        }
                                }
                                $theCode .= '<h4>' . $this->getLanguageService()->getLL('wiz_newPages_currentMenu') . '</h4>' . implode('<br />', $lines);
@@ -185,6 +188,7 @@ class CreatePagesWizardModuleFunctionController extends \TYPO3\CMS\Backend\Modul
                        $index = '{0}';
                        $label = '{1}';
                }
+               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
                $content = '' .
                        '<div class="form-section" id="form-line-' . $index . '">' .
                                '<div class="row">' .
@@ -203,7 +207,7 @@ class CreatePagesWizardModuleFunctionController extends \TYPO3\CMS\Backend\Modul
                                                '<div class="form-control-wrap">' .
                                                        '<div class="input-group">' .
                                                                '<div id="page_new_icon_' . $index . '" class="input-group-addon input-group-icon">' .
-                                                                       IconUtility::getSpriteIconForRecord('pages', array()) .
+                                                                       $iconFactory->getIconForRecord('pages', array(), Icon::SIZE_SMALL)->render() .
                                                                '</div>' .
                                                                '<select class="form-control form-control-adapt t3js-wizardcrpages-select-doktype" name="data[pages][NEW' . $index . '][doktype]" data-target="#page_new_icon_' . $index . '">' .
                                                                        $this->typeSelectHtml .
index 3e67bd1..aa71725 100644 (file)
@@ -15,6 +15,8 @@ namespace TYPO3\CMS\WizardSortpages\View;
  */
 
 use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Page\PageRenderer;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
@@ -72,11 +74,12 @@ class SortPagesWizardModuleFunction extends \TYPO3\CMS\Backend\Module\AbstractFu
                                $lines[] = '<th>' . $lang->getLL('wiz_changeOrder_tCreate') . '</th>';
                                $lines[] = '</tr></thead>';
 
+                               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
                                foreach ($menuItems as $rec) {
                                        $m_perms_clause = $this->getBackendUser()->getPagePermsClause(2);
                                        // edit permissions for that page!
                                        $pRec = BackendUtility::getRecord('pages', $rec['uid'], 'uid', ' AND ' . $m_perms_clause);
-                                       $lines[] = '<tr><td nowrap="nowrap">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('pages', $rec) . (!is_array($pRec) ? '<strong class="text-danger">' . $lang->getLL('wiz_W', TRUE) . '</strong></span> ' : '') . htmlspecialchars(GeneralUtility::fixed_lgd_cs($rec['title'], $GLOBALS['BE_USER']->uc['titleLen'])) . '</td>
+                                       $lines[] = '<tr><td nowrap="nowrap">' . $iconFactory->getIconForRecord('pages', $rec, Icon::SIZE_SMALL)->render() . (!is_array($pRec) ? '<strong class="text-danger">' . $lang->getLL('wiz_W', TRUE) . '</strong></span> ' : '') . htmlspecialchars(GeneralUtility::fixed_lgd_cs($rec['title'], $GLOBALS['BE_USER']->uc['titleLen'])) . '</td>
                                        <td nowrap="nowrap">' . htmlspecialchars(GeneralUtility::fixed_lgd_cs($rec['subtitle'], $this->getBackendUser()->uc['titleLen'])) . '</td>
                                        <td nowrap="nowrap">' . BackendUtility::datetime($rec['tstamp']) . '</td>
                                        <td nowrap="nowrap">' . BackendUtility::datetime($rec['crdate']) . '</td>