[TASK] Replace sprite icon "actions-document-view" with the new IconFactory 32/42432/2
authorMarkus Guenther <mail@markus-guenther.de>
Sun, 9 Aug 2015 06:22:46 +0000 (08:22 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sun, 9 Aug 2015 08:25:16 +0000 (10:25 +0200)
Replaces all IconUtility::getSpriteIcon calls for the icon
actions-document-view with the new IconFactory.

Change-Id: Ie17eed82dd45825d29934206eb1aa2703d4cf4ab
Resolves: #68875
Releases: master
Reviewed-on: http://review.typo3.org/42432
Reviewed-by: Jan Helke <typo3@helke.de>
Tested-by: Jan Helke <typo3@helke.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
17 files changed:
typo3/sysext/backend/Classes/ClickMenu/ClickMenu.php
typo3/sysext/backend/Classes/Controller/ContentElement/ElementInformationController.php
typo3/sysext/backend/Classes/Controller/NewRecordController.php
typo3/sysext/backend/Classes/Controller/PageLayoutController.php
typo3/sysext/backend/Classes/Template/DocumentTemplate.php
typo3/sysext/backend/Classes/View/PageLayoutView.php
typo3/sysext/beuser/Resources/Private/Templates/Permission/Edit.html
typo3/sysext/beuser/Resources/Private/Templates/Permission/Index.html
typo3/sysext/core/Classes/Imaging/IconRegistry.php
typo3/sysext/filelist/Classes/FileList.php
typo3/sysext/frontend/Classes/Controller/TranslationStatusController.php
typo3/sysext/func/Classes/Controller/PageFunctionsController.php
typo3/sysext/impexp/Classes/Controller/ImportExportController.php
typo3/sysext/info/Classes/Controller/InfoModuleController.php
typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php
typo3/sysext/version/Classes/Controller/VersionModuleController.php

index 1ba64fd..ab7c4fd 100644 (file)
@@ -765,7 +765,8 @@ class ClickMenu {
         * @internal
         */
        public function DB_view($id, $anchor = '') {
-               return $this->linkItem($this->label('view'), IconUtility::getSpriteIcon('actions-document-view'), BackendUtility::viewOnClick($id, '', NULL, $anchor) . ';');
+               $icon = $this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL);
+               return $this->linkItem($this->label('view'), $icon, BackendUtility::viewOnClick($id, '', NULL, $anchor) . ';');
        }
 
        /**
index c5ff32a..9b68745 100644 (file)
@@ -593,7 +593,7 @@ class ElementInformationController {
                        $viewOnClick = BackendUtility::viewOnClick($uid, '', BackendUtility::BEgetRootLine($uid));
                        $pageActionIcons .= '
                                <a class="btn btn-default btn-sm" href="#" onclick="' . htmlspecialchars($viewOnClick) . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', TRUE) . '">
-                                       ' . IconUtility::getSpriteIcon('actions-document-view') . '
+                                       ' . $this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL) . '
                                </a>';
                }
 
index 60b62ca..af57def 100644 (file)
@@ -152,9 +152,15 @@ class NewRecordController {
        public $tRows;
 
        /**
+        * @var IconFactory
+        */
+       protected $iconFactory;
+
+       /**
         * Constructor
         */
        public function __construct() {
+               $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
                $GLOBALS['SOBE'] = $this;
                $this->getLanguageService()->includeLLFile('EXT:lang/locallang_misc.xlf');
                $this->init();
@@ -314,7 +320,7 @@ class NewRecordController {
                                $excludeDokTypes = array(PageRepository::DOKTYPE_RECYCLER, PageRepository::DOKTYPE_SYSFOLDER, PageRepository::DOKTYPE_SPACER);
                        }
                        if (!in_array((int)$this->pageinfo['doktype'], $excludeDokTypes, TRUE)) {
-                               $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($this->pageinfo['uid'], '', BackendUtility::BEgetRootLine($this->pageinfo['uid']))) . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-view') . '</a>';
+                               $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($this->pageinfo['uid'], '', BackendUtility::BEgetRootLine($this->pageinfo['uid']))) . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', TRUE) . '">' . $this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL) . '</a>';
                        }
                }
                return $buttons;
index c2b6e02..89383aa 100755 (executable)
@@ -311,6 +311,7 @@ class PageLayoutController {
         * @return void
         */
        public function init() {
+               $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
                $this->getLanguageService()->includeLLFile('EXT:backend/Resources/Private/Language/locallang_layout.xlf');
 
                // Setting module configuration / page select clause
@@ -1139,7 +1140,7 @@ class PageLayoutController {
                );
                // View page
                if (!VersionState::cast($this->pageinfo['t3ver_state'])->equals(VersionState::DELETE_PLACEHOLDER)) {
-                       $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($this->pageinfo['uid'], '', BackendUtility::BEgetRootLine($this->pageinfo['uid']))) . '" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-view') . '</a>';
+                       $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($this->pageinfo['uid'], '', BackendUtility::BEgetRootLine($this->pageinfo['uid']))) . '" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', TRUE) . '">' . $this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL) . '</a>';
                }
                // Shortcut
                if ($this->getBackendUser()->mayMakeShortcut()) {
index 9b24869..3937d5e 100644 (file)
@@ -18,6 +18,8 @@ use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\Utility\IconUtility;
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Core\Html\HtmlParser;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Page\PageRenderer;
 use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
@@ -366,6 +368,11 @@ function jumpToUrl(URL) {
         */
        public $showFlashMessages = TRUE;
 
+       /**
+        * @var IconFactory
+        */
+       protected $iconFactory;
+
        const STATUS_ICON_ERROR = 3;
        const STATUS_ICON_WARNING = 2;
        const STATUS_ICON_NOTIFICATION = 1;
@@ -380,6 +387,7 @@ function jumpToUrl(URL) {
 
                // load Legacy CSS Support
                $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/LegacyCssClasses');
+               $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
 
                // Setting default scriptID:
                if (($temp_M = (string)GeneralUtility::_GET('M')) && $GLOBALS['TBE_MODULES']['_PATHS'][$temp_M]) {
@@ -532,7 +540,7 @@ function jumpToUrl(URL) {
                        'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')
                ), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.showList'));
                // Make link to view page
-               $str .= '<a href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($id, '', BackendUtility::BEgetRootLine($id))) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-view') . '</a>';
+               $str .= '<a href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($id, '', BackendUtility::BEgetRootLine($id))) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', TRUE) . '">' . $this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL) . '</a>';
                return $str;
        }
 
index 9d6a4cd..2da4756 100644 (file)
@@ -687,7 +687,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                                $viewLink = '';
                                if (!VersionState::cast($this->getPageLayoutController()->pageinfo['t3ver_state'])->equals(VersionState::DELETE_PLACEHOLDER)) {
                                        $onClick = BackendUtility::viewOnClick($this->id, '', BackendUtility::BEgetRootLine($this->id), '', '', ('&L=' . $lP));
-                                       $viewLink = '<a href="#" onclick="' . htmlspecialchars($onClick) . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-view') . '</a>';
+                                       $viewLink = '<a href="#" onclick="' . htmlspecialchars($onClick) . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', TRUE) . '">' . $this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL) . '</a>';
                                }
                                // Language overlay page header:
                                if ($lP) {
index 39aeabd..468edf9 100644 (file)
@@ -1,10 +1,13 @@
 {namespace be = TYPO3\CMS\Backend\ViewHelpers}
+{namespace core = TYPO3\CMS\Core\ViewHelpers}
 
 <f:layout name="Permission" />
 
 <f:section name="iconButtons">
        <f:be.buttons.icon uri="{f:uri.action(action:'index')}" icon="actions-view-go-back" />
-       <a href="#" onclick="{previewUrl}" title="{f:translate(key: 'LLL:EXT:lang/locallang_core.xlf:labels.showPage')}"><be:spriteManagerIcon iconName="actions-document-view" /></a>
+       <a href="#" onclick="{previewUrl}" title="{f:translate(key: 'LLL:EXT:lang/locallang_core.xlf:labels.showPage')}">
+               <core:icon identifier="actions-document-view" size="small" />
+       </a>
 </f:section>
 
 <f:section name="headline">
index 8c158e5..0bb9ec9 100644 (file)
@@ -1,10 +1,13 @@
 {namespace be = TYPO3\CMS\Backend\ViewHelpers}
 {namespace bu = TYPO3\CMS\Beuser\ViewHelpers}
+{namespace core = TYPO3\CMS\Core\ViewHelpers}
 
 <f:layout name="Permission" />
 
 <f:section name="iconButtons">
-       <a href="#" onclick="{previewUrl}" title="{f:translate(key: 'LLL:EXT:lang/locallang_core.xlf:labels.showPage')}"><be:spriteManagerIcon iconName="actions-document-view" /></a>
+       <a href="#" onclick="{previewUrl}" title="{f:translate(key: 'LLL:EXT:lang/locallang_core.xlf:labels.showPage')}">
+               <core:icon identifier="actions-document-view" size="small" />
+       </a>
 </f:section>
 
 <f:section name="headline">
index 85852ad..18f1976 100644 (file)
@@ -93,6 +93,12 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
                                'name' => 'pencil',
                        )
                ),
+               'actions-document-view' => array(
+                       'provider' => FontawesomeIconProvider::class,
+                       'options' => array(
+                               'name' => 'desktop',
+                       )
+               ),
 
                // OVERLAYS
                'overlay-read-only' => array(
index d7cf545..796f098 100644 (file)
@@ -20,6 +20,8 @@ use TYPO3\CMS\Backend\RecordList\AbstractRecordList;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\Utility\IconUtility;
 use TYPO3\CMS\Core\Database\DatabaseConnection;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Resource\File;
 use TYPO3\CMS\Core\Resource\Folder;
@@ -175,6 +177,18 @@ class FileList extends AbstractRecordList {
        }
 
        /**
+        * @var IconFactory
+        */
+       protected $iconFactory;
+
+       /**
+        * Constructor
+        */
+       public function __construct() {
+               $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+       }
+
+       /**
         * Initialization of class
         *
         * @param Folder $folderObject The folder to work on
@@ -877,7 +891,7 @@ class FileList extends AbstractRecordList {
                        $fileUrl = $fileOrFolderObject->getPublicUrl(TRUE);
                        if ($fileUrl) {
                                $aOnClick = 'return top.openUrlInWindow(' . GeneralUtility::quoteJSvalue($fileUrl) . ', \'WebFile\');';
-                               $cells['view'] = '<a href="#" class="btn btn-default" onclick="' . htmlspecialchars($aOnClick) . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:cm.view') . '">' . IconUtility::getSpriteIcon('actions-document-view') . '</a>';
+                               $cells['view'] = '<a href="#" class="btn btn-default" onclick="' . htmlspecialchars($aOnClick) . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:cm.view') . '">' . $this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL) . '</a>';
                        } else {
                                $cells['view'] = $this->spaceIcon;
                        }
index c8cec6c..f6ac98c 100644 (file)
@@ -143,7 +143,7 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc
                        $viewPageLink = '<a href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick(
                                        $data['row']['uid'], '', '', '', '', '&L=###LANG_UID###')
                                ) . '" title="' . $lang->sL('LLL:EXT:frontend/Resources/Private/Language/locallang_webinfo.xlf:lang_renderl10n_viewPage') . '">' .
-                               IconUtility::getSpriteIcon('actions-document-view') . '</a>';
+                               $this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL) . '</a>';
                        $status = $data['row']['l18n_cfg'] & 1 ? 'danger' : 'success';
                        // Create links:
                        $info = '';
index 58e56d9..0b80d0b 100644 (file)
@@ -15,6 +15,8 @@ namespace TYPO3\CMS\Func\Controller;
  */
 
 use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Extbase\Object\ObjectManager;
 use TYPO3\CMS\Fluid\View\StandaloneView;
@@ -47,9 +49,15 @@ class PageFunctionsController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
        protected $moduleName = 'web_func';
 
        /**
+        * @var IconFactory
+        */
+       protected $iconFactory;
+
+       /**
         * Constructor
         */
        public function __construct() {
+               $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
                $this->getLanguageService()->includeLLFile('EXT:lang/locallang_mod_web_func.xlf');
                $this->MCONF = array(
                        'name' => $this->moduleName,
@@ -147,7 +155,7 @@ class PageFunctionsController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
                        $buttons['view'] = '<a href="#" '
                                . 'onclick="' . htmlspecialchars(BackendUtility::viewOnClick($this->pageinfo['uid'], '', BackendUtility::BEgetRootLine($this->pageinfo['uid']))) . '" '
                                . 'title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', TRUE) . '">'
-                               . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-view') . '</a>';
+                               . $this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL) . '</a>';
                        // Shortcut
                        if ($this->getBackendUser()->mayMakeShortcut()) {
                                $buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->moduleName);
index 1b87022..7983685 100644 (file)
@@ -16,6 +16,8 @@ namespace TYPO3\CMS\Impexp\Controller;
 
 use TYPO3\CMS\Backend\Utility\IconUtility;
 use TYPO3\CMS\Core\Database\DatabaseConnection;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Page\PageRenderer;
 use TYPO3\CMS\Core\Resource\ResourceFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
@@ -72,6 +74,18 @@ class ImportExportController extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
        protected $treeHTML = '';
 
        /**
+        * @var IconFactory
+        */
+       protected $iconFactory;
+
+       /**
+        * Constructor
+        */
+       public function __construct() {
+               $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+       }
+
+       /**
         * @return void
         */
        public function init() {
@@ -172,7 +186,7 @@ class ImportExportController extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
                                        );
                                        $title = $this->lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', TRUE);
                                        $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars($onClick) . '" title="' . $title . '">'
-                                               . IconUtility::getSpriteIcon('actions-document-view') . '</a>';
+                                               . $this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL) . '</a>';
                                }
                        }
                }
index 6a3f141..1fa2bcc 100644 (file)
@@ -17,6 +17,8 @@ namespace TYPO3\CMS\Info\Controller;
 use TYPO3\CMS\Backend\Module\BaseScriptClass;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\Utility\IconUtility;
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -55,9 +57,15 @@ class InfoModuleController extends BaseScriptClass {
        protected $moduleName = 'web_info';
 
        /**
+        * @var IconFactory
+        */
+       protected $iconFactory;
+
+       /**
         * Constructor
         */
        public function __construct() {
+               $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
                $this->languageService = $GLOBALS['LANG'];
                $this->languageService->includeLLFile('EXT:lang/locallang_mod_web_info.xlf');
 
@@ -149,7 +157,7 @@ class InfoModuleController extends BaseScriptClass {
                                        BackendUtility::BEgetRootLine($this->pageinfo['uid']))
                        ) . '" ' .
                        'title="' . $this->languageService->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', TRUE) . '">' .
-                               IconUtility::getSpriteIcon('actions-document-view') .
+                       $this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL) .
                        '</a>';
                // Shortcut
                if ($this->backendUser->mayMakeShortcut()) {
index 8213320..f09edfa 100644 (file)
@@ -257,7 +257,7 @@ class DatabaseRecordList extends AbstractDatabaseRecordList {
                                $onClick = htmlspecialchars(BackendUtility::viewOnClick($this->id, '', BackendUtility::BEgetRootLine($this->id)));
                                $buttons['view'] = '<a href="#" onclick="' . $onClick . '" title="'
                                        . $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', TRUE) . '">'
-                                       . IconUtility::getSpriteIcon('actions-document-view') . '</a>';
+                                       . $this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL) . '</a>';
                        }
                        // New record
                        if (!$module->modTSconfig['properties']['noCreateRecordsLink']) {
@@ -1234,7 +1234,7 @@ class DatabaseRecordList extends AbstractDatabaseRecordList {
                                                ($table === 'tt_content' ? '#' . $row['uid'] : '')
                                        )
                                ) . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', TRUE) . '">'
-                               . IconUtility::getSpriteIcon('actions-document-view') . '</a>';
+                               . $this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL) . '</a>';
                        $this->addActionToCellGroup($cells, $viewAction, 'view');
                }
                // "Edit" link: ( Only if permissions to edit the page-record of the content of the parent page ($this->id)
index 1bff534..69b8387 100755 (executable)
@@ -280,7 +280,7 @@ class TypoScriptTemplateModuleController extends BaseScriptClass {
 
                if ($this->id && $this->access) {
                        // View page
-                       $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($this->pageinfo['uid'], '', BackendUtility::BEgetRootLine($this->pageinfo['uid']))) . '" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-view') . '</a>';
+                       $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($this->pageinfo['uid'], '', BackendUtility::BEgetRootLine($this->pageinfo['uid']))) . '" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', TRUE) . '">' . $this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL) . '</a>';
                        if ($this->extClassConf['name'] == TypoScriptTemplateInformationModuleFunctionController::class) {
                                // NEW button
                                $urlParameters = array(
index ea4e20c..9bdd144 100644 (file)
@@ -14,6 +14,8 @@ namespace TYPO3\CMS\Version\Controller;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Imaging\Icon;
+use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Utility\ArrayUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
@@ -104,9 +106,15 @@ class VersionModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
        public $recIndex = array();
 
        /**
+        * @var IconFactory
+        */
+       protected $iconFactory;
+
+       /**
         * Initialize language files
         */
        public function __construct() {
+               $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
                $GLOBALS['LANG']->includeLLFile('EXT:version/Resources/Private/Language/locallang.xlf');
        }
 
@@ -248,7 +256,7 @@ class VersionModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
                // CSH
                if ($this->recordFound && $GLOBALS['TCA'][$this->table]['ctrl']['versioningWS']) {
                        // View page
-                       $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($this->pageinfo['uid'], '', BackendUtility::BEgetRootLine($this->pageinfo['uid']))) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-view') . '</a>';
+                       $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($this->pageinfo['uid'], '', BackendUtility::BEgetRootLine($this->pageinfo['uid']))) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', TRUE) . '">' . $this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL) . '</a>';
                        // Shortcut
                        if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
                                $buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']);
@@ -482,12 +490,12 @@ class VersionModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
                        $adminLink .= '<a href="#" onclick="top.loadEditId(' . $row['uid'] . ');top.goToModule(\'' . $pageModule . '\'); return false;">' . IconUtility::getSpriteIcon('actions-page-open') . '</a>';
                        $adminLink .= '<a href="#" onclick="top.loadEditId(' . $row['uid'] . ');top.goToModule(\'web_list\'); return false;">' . IconUtility::getSpriteIcon('actions-system-list-open') . '</a>';
                        // "View page" icon is added:
-                       $adminLink .= '<a href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($row['uid'], '', BackendUtility::BEgetRootLine($row['uid']))) . '">' . IconUtility::getSpriteIcon('actions-document-view') . '</a>';
+                       $adminLink .= '<a href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($row['uid'], '', BackendUtility::BEgetRootLine($row['uid']))) . '">' . $this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL) . '</a>';
                } else {
                        if ($row['pid'] == -1) {
                                $getVars = '&ADMCMD_vPrev[' . rawurlencode(($table . ':' . $row['t3ver_oid'])) . ']=' . $row['uid'];
                                // "View page" icon is added:
-                               $adminLink .= '<a href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($row['_REAL_PID'], '', BackendUtility::BEgetRootLine($row['_REAL_PID']), '', '', $getVars)) . '">' . IconUtility::getSpriteIcon('actions-document-view') . '</a>';
+                               $adminLink .= '<a href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($row['_REAL_PID'], '', BackendUtility::BEgetRootLine($row['_REAL_PID']), '', '', $getVars)) . '">' . $this->iconFactory->getIcon('actions-document-view', Icon::SIZE_SMALL) . '</a>';
                        }
                }
                return $adminLink;