[TASK] Replace sprite icon "status-status-reference-soft" with the new IconFactory 29/43229/3
authorMorton Jonuschat <m.jonuschat@mojocode.de>
Sat, 12 Sep 2015 08:32:29 +0000 (10:32 +0200)
committerAndreas Fernandez <typo3@scripting-base.de>
Sat, 12 Sep 2015 17:33:34 +0000 (19:33 +0200)
Replaces all IconUtility::getSpriteIcon calls for the icon
status-status-reference-soft with the new IconFactory.

Resolves: #69695
Releases: master
Change-Id: I8ffbf549305d0ec701de2f0137df9e5b21c26f94
Reviewed-on: http://review.typo3.org/43229
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Tested-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/core/Classes/Imaging/IconRegistry.php
typo3/sysext/impexp/Classes/ImportExport.php

index 8f67da6..a7fcfaa 100644 (file)
@@ -798,6 +798,12 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
                                'name' => 'times',
                        )
                ),
+               'status-status-reference-soft' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/status/status-reference-soft.png',
+                       )
+               ),
 
                // Mimetypes
                'mimetypes-text-html' => array(
index 88157bb..2bff1e2 100644 (file)
@@ -3672,11 +3672,13 @@ class ImportExport {
                }
                // Soft ref
                if (!empty($record['softrefs'])) {
+                       /** @var IconFactory $iconFactory */
+                       $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
                        $preCode_A = $preCode . '&nbsp;&nbsp;&nbsp;&nbsp;';
                        $preCode_B = $preCode . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
                        foreach ($record['softrefs'] as $info) {
                                $pInfo = array();
-                               $pInfo['preCode'] = $preCode_A . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('status-status-reference-soft');
+                               $pInfo['preCode'] = $preCode_A . $iconFactory->getIcon('status-status-reference-soft', Icon::SIZE_SMALL);
                                $pInfo['title'] = '<em>' . $info['field'] . ', "' . $info['spKey'] . '" </em>: <span title="' . htmlspecialchars($info['matchString']) . '">' . htmlspecialchars(GeneralUtility::fixed_lgd_cs($info['matchString'], 60)) . '</span>';
                                if ($info['subst']['type']) {
                                        if (strlen($info['subst']['title'])) {
@@ -3765,9 +3767,9 @@ class ImportExport {
                                $staticFixed = TRUE;
                        }
 
-                       $spriteIcon = '<span class="' . $iconClass . '" title="' . htmlspecialchars($pInfo['ref']) . '">' . $iconFactory->getIcon($iconName, Icon::SIZE_SMALL) . '</span>';
+                       $icon = '<span class="' . $iconClass . '" title="' . htmlspecialchars($pInfo['ref']) . '">' . $iconFactory->getIcon($iconName, Icon::SIZE_SMALL) . '</span>';
 
-                       $pInfo['preCode'] = $preCode . '&nbsp;&nbsp;&nbsp;&nbsp;' . $spriteIcon;
+                       $pInfo['preCode'] = $preCode . '&nbsp;&nbsp;&nbsp;&nbsp;' . $icon;
                        $pInfo['class'] = $htmlColorClass ?: 'bgColor3';
                        $pInfo['type'] = 'rel';
                        if (!$staticFixed || $this->showStaticRelations) {