[TASK] Replace sprite icon "actions-document-import-t3d" with the new IconFactory 57/42357/2
authorMarkus Guenther <mail@markus-guenther.de>
Fri, 7 Aug 2015 10:04:55 +0000 (12:04 +0200)
committerFrank Nägler <frank.naegler@typo3.org>
Fri, 7 Aug 2015 10:36:22 +0000 (12:36 +0200)
Replaces all IconUtility::getSpriteIcon calls for the icon
actions-document-import-t3d with the new IconFactory.

Change-Id: I4a4dd892ef867b8b900ee35290fa0e682480b70d
Resolves: #68827
Releases: master
Reviewed-on: http://review.typo3.org/42357
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Frank Nägler <frank.naegler@typo3.org>
Tested-by: Frank Nägler <frank.naegler@typo3.org>
typo3/sysext/impexp/Classes/Clickmenu.php
typo3/sysext/recordlist/Classes/Browser/ElementBrowser.php

index 8b1becc..7d77627 100644 (file)
@@ -14,10 +14,25 @@ namespace TYPO3\CMS\Impexp;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
 /**
  * Adding Import/Export clickmenu item
  */
 class Clickmenu {
+       /**
+        * @var IconFactory
+        */
+       protected $iconFactory;
+
+       /**
+        * Construct
+        */
+       public function __construct() {
+               $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+       }
 
        /**
         * Processing of clickmenu items
@@ -59,7 +74,7 @@ class Clickmenu {
                                        ),
                                );
                                $url = \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('xMOD_tximpexp', $urlParameters);
-                               $localItems[] = $backRef->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLLL('import', $LL)), $backRef->excludeIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-import-t3d')), $backRef->urlRefForCM($url), 1);
+                               $localItems[] = $backRef->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLLL('import', $LL)), $backRef->excludeIcon($this->iconFactory->getIcon('actions-document-import-t3d', Icon::SIZE_SMALL)), $backRef->urlRefForCM($url), 1);
                        }
                }
                return array_merge($menuItems, $localItems);
index 865ab54..84a6805 100755 (executable)
@@ -24,6 +24,8 @@ use TYPO3\CMS\Backend\Utility\IconUtility;
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Core\Database\DatabaseConnection;
 use TYPO3\CMS\Core\ElementBrowser\ElementBrowserHookInterface;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Page\PageRenderer;
 use TYPO3\CMS\Core\Resource\Exception;
@@ -255,6 +257,18 @@ class ElementBrowser {
        protected $pageRenderer = NULL;
 
        /**
+        * @var IconFactory
+        */
+       protected $iconFactory;
+
+       /**
+       * Construct
+       */
+       public function __construct() {
+               $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+       }
+
+       /**
         * Sets the script url depending on being a module or script request
         */
        protected function determineScriptUrl() {
@@ -2520,8 +2534,9 @@ class ElementBrowser {
                $labelImportSelection = $lang->sL('LLL:EXT:lang/locallang_browse_links.xlf:importSelection', TRUE);
                // Getting flag for showing/not showing thumbnails:
                $noThumbsInEB = $this->getBackendUser()->getTSConfigVal('options.noThumbsInEB');
-               $out = $this->doc->spacer(10) . '<div>' . '<a href="#" onclick="BrowseLinks.Selector.handle()">'
-                       . IconUtility::getSpriteIcon('actions-document-import-t3d', array('title' => $labelImportSelection))
+               $out = $this->doc->spacer(10) . '<div>' . '<a href="#" onclick="BrowseLinks.Selector.handle()"'
+                       . 'title="' . $labelImportSelection . '">'
+                       . $this->iconFactory->getIcon('actions-document-import-t3d', Icon::SIZE_SMALL)
                        . $labelImportSelection . '</a>&nbsp;&nbsp;&nbsp;'
                        . '<a href="#" onclick="BrowseLinks.Selector.toggle()">'
                        . IconUtility::getSpriteIcon('actions-document-select', array('title' => $labelToggleSelection))