[TASK] Replace icon by IconFactory: extensions-extensionmanager-update-script 13/43213/3
authorWouter Wolters <typo3@wouterwolters.nl>
Fri, 11 Sep 2015 17:58:35 +0000 (19:58 +0200)
committerNicole Cordes <typo3@cordes.co>
Sat, 12 Sep 2015 10:00:43 +0000 (12:00 +0200)
Resolves: #69685
Releases: master
Change-Id: Ib1da2d54ee777d705f514489afae45f0e5d2eda8
Reviewed-on: http://review.typo3.org/43213
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
typo3/sysext/core/Classes/Imaging/IconRegistry.php
typo3/sysext/extensionmanager/Classes/ViewHelpers/UpdateScriptViewHelper.php

index 1a7ce49..72cc302 100644 (file)
@@ -659,6 +659,14 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
                        )
                ),
 
+               // Extensions
+               'extensions-extensionmanager-update-script' => array(
+                       'provider' => FontawesomeIconProvider::class,
+                       'options' => array(
+                               'name' => 'refresh',
+                       )
+               ),
+
                // specials
                'empty-empty' => array(
                        'provider' => FontawesomeIconProvider::class,
index 8d04a5b..de834fd 100644 (file)
@@ -54,6 +54,8 @@ class UpdateScriptViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Link\ActionVie
                // If the "class.ext_update.php" file exists, build link to the update script screen
                /** @var $updateScriptUtility \TYPO3\CMS\Extensionmanager\Utility\UpdateScriptUtility */
                $updateScriptUtility = $this->objectManager->get(\TYPO3\CMS\Extensionmanager\Utility\UpdateScriptUtility::class);
+               /** @var IconFactory $iconFactory */
+               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
                if ($updateScriptUtility->checkUpdateScriptExists($extensionKey)) {
                        $uriBuilder = $this->controllerContext->getUriBuilder();
                        $action = 'show';
@@ -64,11 +66,10 @@ class UpdateScriptViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Link\ActionVie
                        );
                        $this->tag->addAttribute('href', $uri);
                        $this->tag->addAttribute('title', \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('extensionList.update.script', 'extensionmanager'));
-                       $this->tag->setContent(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('extensions-extensionmanager-update-script'));
+                       $this->tag->setContent($iconFactory->getIcon('extensions-extensionmanager-update-script', Icon::SIZE_SMALL)->render());
                        $tag = $this->tag->render();
                } else {
-                       $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
-                       return '<span class="btn btn-default disabled">' . $iconFactory->getIcon('empty-empty', Icon::SIZE_SMALL) . '</span>';
+                       return '<span class="btn btn-default disabled">' . $iconFactory->getIcon('empty-empty', Icon::SIZE_SMALL)->render() . '</span>';
                }
                return $tag;
        }