[TASK] Use IconFactory in System Information Panel 12/45212/2
authorFrank Nägler <frank.naegler@typo3.org>
Fri, 11 Dec 2015 13:17:30 +0000 (14:17 +0100)
committerAndreas Fernandez <typo3@scripting-base.de>
Fri, 11 Dec 2015 13:32:34 +0000 (14:32 +0100)
Resolves: #72178
Releases: master
Change-Id: Ia1de64625280ad0cd50e56c80f3ea6efc2c0e86a
Reviewed-on: https://review.typo3.org/45212
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Tested-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/backend/Classes/Backend/ToolbarItems/SystemInformationToolbarItem.php
typo3/sysext/core/Classes/Imaging/IconRegistry.php

index 7c4eee8..b1892ae 100644 (file)
@@ -150,7 +150,7 @@ class SystemInformationToolbarItem implements ToolbarItemInterface
         $this->systemInformation[] = array(
             'title' => $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.sysinfo.phpversion', true),
             'value' => PHP_VERSION,
-            'icon' => '<span class="fa fa-code fa-fw"></span>'
+            'icon' => $this->iconFactory->getIcon('sysinfo-php-version', Icon::SIZE_SMALL)->render()
         );
     }
 
@@ -164,7 +164,7 @@ class SystemInformationToolbarItem implements ToolbarItemInterface
         $this->systemInformation[] = array(
             'title' => $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.sysinfo.database', true),
             'value' => $this->getDatabaseConnection()->getServerVersion(),
-            'icon' => '<span class="fa fa-database fa-fw"></span>'
+            'icon' => $this->iconFactory->getIcon('sysinfo-database', Icon::SIZE_SMALL)->render()
         );
     }
 
@@ -180,7 +180,7 @@ class SystemInformationToolbarItem implements ToolbarItemInterface
             'title' => $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.sysinfo.applicationcontext', true),
             'value' => (string)$applicationContext,
             'status' => $applicationContext->isProduction() ? InformationStatus::STATUS_OK : InformationStatus::STATUS_WARNING,
-            'icon' => '<span class="fa fa-tasks fa-fw"></span>'
+            'icon' => $this->iconFactory->getIcon('sysinfo-application-context', Icon::SIZE_SMALL)->render()
         );
     }
 
@@ -197,7 +197,7 @@ class SystemInformationToolbarItem implements ToolbarItemInterface
         $this->systemInformation[] = array(
             'title' => $languageService->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.sysinfo.composerMode', true),
             'value' => $languageService->sL('LLL:EXT:lang/locallang_core.xlf:labels.enabled', true),
-            'icon' => '<span class="fa fa-music fa-fw"></span>'
+            'icon' => $this->iconFactory->getIcon('sysinfo-composer-mode', Icon::SIZE_SMALL)->render()
         );
     }
 
@@ -224,7 +224,7 @@ class SystemInformationToolbarItem implements ToolbarItemInterface
             $this->systemInformation[] = array(
                 'title' => $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.sysinfo.gitrevision', true),
                 'value' => sprintf('%s [%s]', $revision, $branch),
-                'icon' => '<span class="fa fa-git fa-fw"></span>'
+                'icon' => $this->iconFactory->getIcon('sysinfo-git', Icon::SIZE_SMALL)->render()
             );
         }
     }
@@ -250,7 +250,7 @@ class SystemInformationToolbarItem implements ToolbarItemInterface
         $this->systemInformation[] = array(
             'title' => $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.sysinfo.operatingsystem', true),
             'value' => $kernelName . ' ' . php_uname('r'),
-            'icon' => '<span class="fa fa-' . htmlspecialchars($icon) . ' fa-fw"></span>'
+            'icon' => $this->iconFactory->getIcon('sysinfo-os-' . $icon, Icon::SIZE_SMALL)->render()
         );
     }
 
@@ -262,7 +262,7 @@ class SystemInformationToolbarItem implements ToolbarItemInterface
         $this->systemInformation[] = array(
             'title' => $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.sysinfo.webserver', true),
             'value' => htmlspecialchars($_SERVER['SERVER_SOFTWARE']),
-            'icon' => '<span class="fa fa-server fa-fw"></span>'
+            'icon' => $this->iconFactory->getIcon('sysinfo-webserver', Icon::SIZE_SMALL)->render()
         );
     }
 
index b433251..ff8c2cb 100644 (file)
@@ -2372,6 +2372,63 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface
             )
         ),
 
+        // System Information
+        'sysinfo-php-version' => array(
+            'provider' => FontawesomeIconProvider::class,
+            'options' => array(
+                'name' => 'code'
+            )
+        ),
+        'sysinfo-database' =>  array(
+            'provider' => FontawesomeIconProvider::class,
+            'options' => array(
+                'name' => 'database'
+            )
+        ),
+        'sysinfo-application-context' => array(
+            'provider' => FontawesomeIconProvider::class,
+            'options' => array(
+                'name' => 'tasks'
+            )
+        ),
+        'sysinfo-composer-mode' => array(
+            'provider' => FontawesomeIconProvider::class,
+            'options' => array(
+                'name' => 'music'
+            )
+        ),
+        'sysinfo-git' => array(
+            'provider' => FontawesomeIconProvider::class,
+            'options' => array(
+                'name' => 'git'
+            )
+        ),
+        'sysinfo-webserver' => array(
+            'provider' => FontawesomeIconProvider::class,
+            'options' => array(
+                'name' => 'server'
+            )
+        ),
+        'sysinfo-os-linux' => array(
+            'provider' => FontawesomeIconProvider::class,
+            'options' => array(
+                'name' => 'linux'
+            )
+        ),
+        'sysinfo-os-apple' => array(
+            'provider' => FontawesomeIconProvider::class,
+            'options' => array(
+                'name' => 'apple'
+            )
+        ),
+        'sysinfo-os-windows' => array(
+            'provider' => FontawesomeIconProvider::class,
+            'options' => array(
+                'name' => 'windows'
+            )
+        ),
+
+
         // Sysnote
         'sysnote-type-0' => array(
             'provider' => FontawesomeIconProvider::class,