[TASK] Replace icon by IconFactory: actions-system-cache-clear 10/43210/4
authorWouter Wolters <typo3@wouterwolters.nl>
Fri, 11 Sep 2015 17:27:23 +0000 (19:27 +0200)
committerAndreas Fernandez <typo3@scripting-base.de>
Sat, 12 Sep 2015 10:24:41 +0000 (12:24 +0200)
Resolves: #69673
Releases: master
Change-Id: I9da05c52f013e111407343ed6fec4f792ec59a5f
Reviewed-on: http://review.typo3.org/43210
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/backend/Classes/Controller/PageLayoutController.php
typo3/sysext/core/Classes/Imaging/IconRegistry.php
typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php

index ed3c6ac..0e1a287 100755 (executable)
@@ -1149,9 +1149,6 @@ class PageLayoutController {
         * @return array all available buttons as an assoc. array
         */
        protected function getButtons($function = '') {
-               /** @var IconFactory $iconFactory */
-               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
-
                $lang = $this->getLanguageService();
                $buttons = array(
                        'view' => '',
@@ -1183,7 +1180,7 @@ class PageLayoutController {
                }
                // Cache
                if (!$this->modTSconfig['properties']['disableAdvanced']) {
-                       $buttons['cache'] = '<a href="' . htmlspecialchars(BackendUtility::getModuleUrl('web_layout', array('id' => $this->pageinfo['uid'], 'clear_cache' => '1'))) . '" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.clear_cache', TRUE) . '">' . IconUtility::getSpriteIcon('actions-system-cache-clear') . '</a>';
+                       $buttons['cache'] = '<a href="' . htmlspecialchars(BackendUtility::getModuleUrl('web_layout', array('id' => $this->pageinfo['uid'], 'clear_cache' => '1'))) . '" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.clear_cache', TRUE) . '">' . $this->iconFactory->getIcon('actions-system-cache-clear', Icon::SIZE_SMALL)->render() . '</a>';
                }
                if (!$this->modTSconfig['properties']['disableIconToolbar']) {
                        // Move record
@@ -1287,7 +1284,7 @@ class PageLayoutController {
                                                                        )
                                                                ) . '#latest'
                                                        ) . ');return false;') . '"
-                                               title="' . $lang->getLL('recordHistory', TRUE) . '">' . $iconFactory->getIcon('actions-document-history-open', Icon::SIZE_SMALL) . '</a>';
+                                               title="' . $lang->getLL('recordHistory', TRUE) . '">' . $this->iconFactory->getIcon('actions-document-history-open', Icon::SIZE_SMALL) . '</a>';
                                }
                        }
                }
index c34371d..78dd7f1 100644 (file)
@@ -478,6 +478,12 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
                                'name' => 'sign-out',
                        )
                ),
+               'actions-system-cache-clear' => array(
+                       'provider' => FontawesomeIconProvider::class,
+                       'options' => array(
+                               'name' => 'bolt',
+                       )
+               ),
                'actions-system-cache-clear-impact-low' => array(
                        'provider' => SvgIconProvider::class,
                        'options' => array(
index 66fdcad..9a6bd6a 100644 (file)
@@ -289,7 +289,7 @@ class DatabaseRecordList extends AbstractDatabaseRecordList {
                        // Cache
                        $buttons['cache'] = '<a href="' . htmlspecialchars(($this->listURL() . '&clear_cache=1')) . '" title="'
                                . $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.clear_cache', TRUE) . '">'
-                               . IconUtility::getSpriteIcon('actions-system-cache-clear') . '</a>';
+                               . $this->iconFactory->getIcon('actions-system-cache-clear', Icon::SIZE_SMALL)->render() . '</a>';
                        if (
                                $this->table && (!isset($module->modTSconfig['properties']['noExportRecordsLinks'])
                                || (isset($module->modTSconfig['properties']['noExportRecordsLinks'])