[TASK] Replace sprite icon "actions-insert-reference" with the new IconFactory 61/42961/4
authorMorton Jonuschat <m.jonuschat@mojocode.de>
Tue, 1 Sep 2015 17:29:42 +0000 (19:29 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Tue, 1 Sep 2015 20:05:01 +0000 (22:05 +0200)
Replaces all IconUtility::getSpriteIcon calls for the icon
actions-insert-reference with the new IconFactory.

Resolves: #68974
Releases: master
Change-Id: Ic85e7aebf46010859a9ef60b329cc40a353909f5
Reviewed-on: http://review.typo3.org/42961
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/core/Classes/Imaging/IconRegistry.php
typo3/sysext/impexp/Classes/ImportExport.php

index 5474871..20196e8 100644 (file)
@@ -210,6 +210,12 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
                                'source' => 'EXT:t3skin/images/icons/actions/insert-record.png',
                        )
                ),
+               'actions-insert-reference' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/actions/insert-reference.png',
+                       )
+               ),
                'actions-markstate' => array(
                        'provider' => FontawesomeIconProvider::class,
                        'options' => array(
index 4f9186f..2953ac7 100644 (file)
@@ -17,6 +17,8 @@ namespace TYPO3\CMS\Impexp;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\DataHandling\DataHandler;
 use TYPO3\CMS\Core\Exception;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Resource\ResourceFactory;
 use TYPO3\CMS\Core\Utility\File\ExtendedFileUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
@@ -3786,6 +3788,9 @@ class ImportExport {
         * @see singleRecordLines()
         */
        public function addFiles($rels, &$lines, $preCode, $htmlColorClass = '', $tokenID = '') {
+               /** @var IconFactory $iconFactory */
+               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+
                foreach ($rels as $ID) {
                        // Process file:
                        $pInfo = array();
@@ -3870,7 +3875,7 @@ class ImportExport {
                                                $pInfo['updatePath'] = $fI['parentRelFileName'];
                                        }
                                        $pInfo['showDiffContent'] = PathUtility::stripPathSitePrefix($this->fileIDMap[$extID]);
-                                       $pInfo['preCode'] = $preCode . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-insert-reference');
+                                       $pInfo['preCode'] = $preCode . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . $iconFactory->getIcon('actions-insert-reference', Icon::SIZE_SMALL);
                                        $pInfo['title'] = htmlspecialchars($fI['filename']) . ' <em>(Resource)</em>';
                                        $pInfo['ref'] = 'FILE';
                                        $pInfo['size'] = $fI['filesize'];