[TASK] Replace sprite icon "actions-edit-merge-localization" with the new IconFactory 65/42965/4
authorMorton Jonuschat <m.jonuschat@mojocode.de>
Tue, 1 Sep 2015 18:34:30 +0000 (20:34 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Tue, 1 Sep 2015 19:31:54 +0000 (21:31 +0200)
Replaces all IconUtility::getSpriteIcon calls for the icon
actions-edit-merge-localization with the new IconFactory.

Resolves: #68930
Releases: master
Change-Id: I59cc9dc9dd88e22ed0d86f9ea1d149c3c4d4e4e9
Reviewed-on: http://review.typo3.org/42965
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/backend/Classes/Form/Container/SingleFieldContainer.php
typo3/sysext/core/Classes/Imaging/IconRegistry.php

index 4b58883..1ff7073 100644 (file)
@@ -16,13 +16,14 @@ namespace TYPO3\CMS\Backend\Form\Container;
 
 use TYPO3\CMS\Backend\Form\ElementConditionMatcher;
 use TYPO3\CMS\Backend\Form\NodeFactory;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Backend\Form\Utility\FormEngineUtility;
 use TYPO3\CMS\Core\Utility\ArrayUtility;
 use TYPO3\CMS\Lang\LanguageService;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
-use TYPO3\CMS\Backend\Utility\IconUtility;
 use TYPO3\CMS\Core\Utility\DiffUtility;
 use TYPO3\CMS\Backend\Form\InlineStackProcessor;
 use TYPO3\CMS\Core\Database\RelationHandler;
@@ -336,7 +337,8 @@ class SingleFieldContainer extends AbstractContainer {
                        // Don't show content if it's for IRRE child records:
                        if ($fieldConfig['config']['type'] !== 'inline') {
                                if ($defaultLanguageValue !== '') {
-                                       $item .= '<div class="t3-form-original-language">' . FormEngineUtility::getLanguageIcon($table, $row, 0)
+                                       $item .= '<div class="t3-form-original-language" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_misc.xlf:localizeMergeIfNotBlank', TRUE) . '">'
+                                               . FormEngineUtility::getLanguageIcon($table, $row, 0)
                                                . $this->getMergeBehaviourIcon($fieldConfig['l10n_mode'])
                                                . $this->previewFieldValue($defaultLanguageValue, $fieldConfig, $field) . '</div>';
                                }
@@ -350,7 +352,7 @@ class SingleFieldContainer extends AbstractContainer {
                                                1
                                        );
                                        if ($defaultLanguageValue !== '') {
-                                               $item .= '<div class="t3-form-original-language">'
+                                               $item .= '<div class="t3-form-original-language" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_misc.xlf:localizeMergeIfNotBlank', TRUE) . '">'
                                                        . FormEngineUtility::getLanguageIcon($table, $row, ('v' . $previewLanguage['ISOcode']))
                                                        . $this->getMergeBehaviourIcon($fieldConfig['l10n_mode'])
                                                        . $this->previewFieldValue($defaultLanguageValue, $fieldConfig, $field) . '</div>';
@@ -373,10 +375,9 @@ class SingleFieldContainer extends AbstractContainer {
        protected function getMergeBehaviourIcon($l10nMode) {
                $icon = '';
                if ($l10nMode === 'mergeIfNotBlank') {
-                       $icon = IconUtility::getSpriteIcon(
-                               'actions-edit-merge-localization',
-                               array('title' => $this->getLanguageService()->sL('LLL:EXT:lang/locallang_misc.xlf:localizeMergeIfNotBlank'))
-                       );
+                       /** @var IconFactory $iconFactory */
+                       $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+                       $icon = $iconFactory->getIcon('actions-edit-merge-localization', Icon::SIZE_SMALL);
                }
                return $icon;
        }
index 87c17fe..5474871 100644 (file)
@@ -168,6 +168,12 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
                                'name' => 'trash',
                        )
                ),
+               'actions-edit-merge-localization' => array(
+                       'provider' => BitmapIconProvider::class,
+                       'options' => array(
+                               'source' => 'EXT:t3skin/images/icons/actions/edit-merge-localization.png',
+                       )
+               ),
                'actions-edit-pick-date' => array(
                        'provider' => FontawesomeIconProvider::class,
                        'options' => array(