[TASK] Replace icon by IconFactory: actions-system-list-open 73/43073/6
authorJan Helke <typo3@helke.de>
Sun, 6 Sep 2015 17:35:23 +0000 (19:35 +0200)
committerFrank Nägler <frank.naegler@typo3.org>
Mon, 7 Sep 2015 19:26:28 +0000 (21:26 +0200)
Releases: master
Resolves: #69566
Change-Id: I20563cfcbe5c09629bc9813bef797b0a133d801e
Reviewed-on: http://review.typo3.org/43073
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Frank Nägler <frank.naegler@typo3.org>
Tested-by: Frank Nägler <frank.naegler@typo3.org>
typo3/sysext/backend/Classes/Backend/ToolbarItems/SystemInformationToolbarItem.php
typo3/sysext/backend/Classes/ClickMenu/ClickMenu.php
typo3/sysext/backend/Classes/Controller/ContentElement/ElementInformationController.php
typo3/sysext/backend/Classes/Controller/PageTreeNavigationController.php
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/frontend/Classes/View/AdminPanelView.php

index 0eb36f1..a9179f9 100644 (file)
@@ -79,12 +79,18 @@ class SystemInformationToolbarItem implements ToolbarItemInterface {
        protected $signalSlotDispatcher = NULL;
 
        /**
+        * @var IconFactory
+        */
+       protected $iconFactory;
+
+       /**
         * Constructor
         */
        public function __construct() {
                if (!$this->checkAccess()) {
                        return;
                }
+               $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
 
                $extPath = ExtensionManagementUtility::extPath('backend');
                /* @var $view StandaloneView */
@@ -276,9 +282,8 @@ class SystemInformationToolbarItem implements ToolbarItemInterface {
         * @return string Icon HTML
         */
        public function getItem() {
-               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
                $title = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.sysinfo', TRUE);
-               $icon = $iconFactory->getIcon('actions-system-list-open', Icon::SIZE_SMALL);
+               $icon = $this->iconFactory->getIcon('actions-system-list-open', Icon::SIZE_SMALL);
                return '<span title="' . $title . '">' . $icon . '<span id="t3js-systeminformation-counter" class="badge"></span></span>';
        }
 
@@ -379,4 +384,4 @@ class SystemInformationToolbarItem implements ToolbarItemInterface {
                }
                return $this->signalSlotDispatcher;
        }
-}
\ No newline at end of file
+}
index 468e51a..92c05f6 100644 (file)
@@ -613,7 +613,7 @@ class ClickMenu {
                $url = BackendUtility::getModuleUrl('web_list', $urlParams, '', TRUE);
                return $this->linkItem(
                        $this->languageService->makeEntities($this->languageService->getLL('CM_db_list')),
-                       IconUtility::getSpriteIcon('actions-system-list-open'), 'top.nextLoadModuleUrl=' . GeneralUtility::quoteJSvalue($url) . ';top.goToModule(\'web_list\', 1);',
+                       $this->iconFactory->getIcon('actions-system-list-open', Icon::SIZE_SMALL), 'top.nextLoadModuleUrl=' . GeneralUtility::quoteJSvalue($url) . ';top.goToModule(\'web_list\', 1);',
                        0
                );
        }
index 272d8c7..1a6536a 100644 (file)
@@ -611,7 +611,7 @@ class ElementInformationController implements \TYPO3\CMS\Core\Http\ControllerInt
                        $url = BackendUtility::getModuleUrl('web_list', array('id' => $uid, 'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')));
                        $pageActionIcons .= '
                                <a class="btn btn-default btn-sm" href="' . htmlspecialchars($url) . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.showList') . '">
-                                       ' . IconUtility::getSpriteIcon('actions-system-list-open') . '
+                                       ' . $this->iconFactory->getIcon('actions-system-list-open', Icon::SIZE_SMALL) . '
                                </a>';
 
                        // View page button
index b5a7ced..43ab7e3 100644 (file)
@@ -21,8 +21,6 @@ use TYPO3\CMS\Backend\View\PageTreeView;
 use TYPO3\CMS\Core\Imaging\Icon;
 use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Messaging\FlashMessage;
-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;
index 8a0f098..63d6081 100755 (executable)
@@ -3353,7 +3353,9 @@ class BackendUtility {
         * @return string A complete <a href=""> tag
         */
        static public function getListViewLink($urlParameters = array(), $linkTitle = '', $linkText = '') {
-               return '<a href="' . htmlspecialchars(self::getModuleUrl('web_list', $urlParameters)) . '" title="' . htmlspecialchars($linkTitle) . '">' . IconUtility::getSpriteIcon('actions-system-list-open') . htmlspecialchars($linkText) . '</a>';
+               /** @var IconFactory $iconFactory */
+               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+               return '<a href="' . htmlspecialchars(self::getModuleUrl('web_list', $urlParameters)) . '" title="' . htmlspecialchars($linkTitle) . '">' . $iconFactory->getIcon('actions-system-list-open', Icon::SIZE_SMALL) . htmlspecialchars($linkText) . '</a>';
        }
 
        /**
index ed5ed7a..221da2d 100755 (executable)
@@ -676,7 +676,7 @@ class AdminPanelView {
                                'id' => $id,
                                'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')
                        );
-                       $icon = IconUtility::getSpriteIcon('actions-system-list-open', array('title' => $this->extGetLL('edit_db_list', FALSE)));
+                       $icon = '<span title="' . $this->extGetLL('edit_db_list', FALSE) . '">' . $this->iconFactory->getIcon('actions-system-list-open', Icon::SIZE_SMALL)->render() . '</span>';
                        $toolBar .= '<a class="t3-icon btn btn-default" href="' . htmlspecialchars(BackendUtility::getModuleUrl('web_list', $urlParams)) . '">' . $icon . '</a>';
                }