[TASK] Replace sprite icon "actions-view-go-forward" with the new IconFactory 97/43197/4
authorMorton Jonuschat <m.jonuschat@mojocode.de>
Fri, 11 Sep 2015 13:09:45 +0000 (15:09 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 11 Sep 2015 14:21:09 +0000 (16:21 +0200)
Replaces all IconUtility::getSpriteIcon calls for the icon
actions-view-go-forward with the new IconFactory.

Resolves: #69674
Releases: master
Change-Id: I4aa7db0b28ffc7b5c33f28a376a89dc10cd21633
Reviewed-on: http://review.typo3.org/43197
Reviewed-by: Frank Nägler <frank.naegler@typo3.org>
Tested-by: Frank Nägler <frank.naegler@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/context_help/Classes/Controller/ContextHelpAjaxController.php
typo3/sysext/core/Classes/Imaging/IconRegistry.php

index 4fc1f1a..791e4c3 100755 (executable)
@@ -2719,7 +2719,9 @@ class BackendUtility {
                }
                // Add see also arrow if we have more info
                if ($helpTextArray['moreInfo']) {
-                       $arrow = IconUtility::getSpriteIcon('actions-view-go-forward');
+                       /** @var IconFactory $iconFactory */
+                       $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+                       $arrow = $iconFactory->getIcon('actions-view-go-forward', Icon::SIZE_SMALL)->render();
                }
                // Wrap description and arrow in p tag
                if ($helpTextArray['description'] !== NULL || $arrow) {
index 37b1910..f0fec36 100644 (file)
@@ -15,9 +15,10 @@ namespace TYPO3\CMS\ContextHelp\Controller;
  */
 
 use TYPO3\CMS\Core\Http\AjaxRequestHandler;
+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\Backend\Utility\IconUtility;
 
 /**
  * Class ContextHelpAjaxController
@@ -51,7 +52,9 @@ class ContextHelpAjaxController {
         */
        protected function getContextHelp($table, $field) {
                $helpTextArray = BackendUtility::helpTextArray($table, $field);
-               $moreIcon = $helpTextArray['moreInfo'] ? IconUtility::getSpriteIcon('actions-view-go-forward') : '';
+               /** @var IconFactory $iconFactory */
+               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+               $moreIcon = $helpTextArray['moreInfo'] ? $iconFactory->getIcon('actions-view-go-forward', Icon::SIZE_SMALL)->render() : '';
                return array(
                        'title' => $helpTextArray['title'],
                        'description' => '<p class="t3-help-short' . ($moreIcon ? ' tipIsLinked' : '') . '">' . $helpTextArray['description'] . $moreIcon . '</p>',
index 30c089c..0827255 100644 (file)
@@ -562,6 +562,12 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
                                'name' => 'angle-double-left',
                        )
                ),
+               'actions-view-go-forward' => array(
+                       'provider' => FontawesomeIconProvider::class,
+                       'options' => array(
+                               'name' => 'angle-double-right',
+                       )
+               ),
                'actions-view-go-up' => array(
                        'provider' => FontawesomeIconProvider::class,
                        'options' => array(