[TASK] Replace icon by IconFactory: mimetypes-text-html 37/43037/2
authorJan Helke <typo3@helke.de>
Fri, 4 Sep 2015 16:17:58 +0000 (18:17 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Sat, 5 Sep 2015 11:35:32 +0000 (13:35 +0200)
Releases: master
Resolves: #69538
Change-Id: If1b41207ae24bc3200732f389063f75379fd2f68
Reviewed-on: http://review.typo3.org/43037
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/Backend/ToolbarItems/ShortcutToolbarItem.php
typo3/sysext/core/Classes/Imaging/IconRegistry.php

index 2167e43..f4c0c4a 100644 (file)
@@ -113,9 +113,8 @@ class ShortcutToolbarItem implements ToolbarItemInterface {
         * @return string HTML
         */
        public function getItem() {
-               $iconRegistry = GeneralUtility::makeInstance(IconFactory::class);
                $title = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.bookmarks', TRUE);
-               return '<span title="' . $title . '">' . $iconRegistry->getIcon('apps-toolbar-menu-shortcut', Icon::SIZE_SMALL)->render() . '</span>';
+               return '<span title="' . $title . '">' . $this->iconFactory->getIcon('apps-toolbar-menu-shortcut', Icon::SIZE_SMALL)->render() . '</span>';
        }
 
        /**
@@ -765,7 +764,7 @@ class ShortcutToolbarItem implements ToolbarItemInterface {
                                }
                                break;
                        case 'file_edit':
-                               $icon = IconUtility::getSpriteIcon('mimetypes-text-html', array('title' => $titleAttribute));
+                               $icon = '<span title="' . $titleAttribute . '">' . $this->iconFactory->getIcon('mimetypes-text-html', Icon::SIZE_SMALL)->render() . '</span>';
                                break;
                        case 'wizard_rte':
                                $icon = '<span title="' . $titleAttribute . '">' . $this->iconFactory->getIcon('mimetypes-word', Icon::SIZE_SMALL)->render() . '</span>';
index f5ded43..bb37db5 100644 (file)
@@ -434,6 +434,14 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
                        )
                ),
 
+               // Mimetypes
+               'mimetypes-text-html' => array(
+                       'provider' => FontawesomeIconProvider::class,
+                       'options' => array(
+                               'name' => 'file-text-o',
+                       )
+               ),
+
                // Overlays
                'overlay-read-only' => array(
                        'provider' => FontawesomeIconProvider::class,