[TASK] Add composer mode to the application information panel 09/43909/12
authorPatrick Schriner <patrick.schriner@diemedialen.de>
Thu, 8 Oct 2015 12:56:38 +0000 (14:56 +0200)
committerHelmut Hummel <helmut.hummel@typo3.org>
Thu, 8 Oct 2015 23:19:56 +0000 (01:19 +0200)
Resolves: #70518
Releases: master
Change-Id: If1144e6de80161df08ec4664fbce827d070571cb
Reviewed-on: http://review.typo3.org/43909
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Helmut Hummel <helmut.hummel@typo3.org>
Tested-by: Helmut Hummel <helmut.hummel@typo3.org>
typo3/sysext/backend/Classes/Backend/ToolbarItems/SystemInformationToolbarItem.php
typo3/sysext/lang/locallang_core.xlf

index cba2a03..79283f2 100644 (file)
@@ -19,6 +19,7 @@ use Psr\Http\Message\ServerRequestInterface;
 use TYPO3\CMS\Backend\Toolbar\ToolbarItemInterface;
 use TYPO3\CMS\Backend\Toolbar\Enumeration\InformationStatus;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Core\Core\Bootstrap;
 use TYPO3\CMS\Core\Imaging\Icon;
 use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Page\PageRenderer;
@@ -113,6 +114,7 @@ class SystemInformationToolbarItem implements ToolbarItemInterface
         $this->getPhpVersion();
         $this->getDatabase();
         $this->getApplicationContext();
+        $this->getClassLoaderMode();
         $this->getGitRevision();
         $this->getOperatingSystem();
 
@@ -183,6 +185,23 @@ class SystemInformationToolbarItem implements ToolbarItemInterface
     }
 
     /**
+     * Adds the class loading mode (Composer/TYPO3) to the displayed systen information
+     *
+     * @return void
+     */
+    protected function getClassLoaderMode()
+    {
+        $languageService = $this->getLanguageService();
+        $this->systemInformation[] = array(
+            'title' => $languageService->sL('LLL:EXT:lang/locallang_core.xlf:toolbarItems.sysinfo.composerMode', true),
+            'value' => Bootstrap::usesComposerClassLoading()
+                ? $languageService->sL('LLL:EXT:lang/locallang_core.xlf:labels.enabled', true)
+                : $languageService->sL('LLL:EXT:lang/locallang_core.xlf:labels.disabled', true),
+            'icon' => '<span class="fa fa-music"></span>'
+        );
+    }
+
+    /**
      * Gets the current GIT revision and branch
      *
      * @return void
index e4de408..e134c58 100644 (file)
@@ -181,6 +181,9 @@ Do you want to continue WITHOUT saving?</source>
                        <trans-unit id="labels.enabled">
                                <source>Enabled</source>
                        </trans-unit>
+                       <trans-unit id="labels.disabled">
+                               <source>Disabled</source>
+                       </trans-unit>
                        <trans-unit id="labels.show">
                                <source>Show</source>
                        </trans-unit>
@@ -1182,6 +1185,9 @@ Do you want to refresh it now?</source>
                        <trans-unit id="toolbarItems.sysinfo.applicationcontext">
                                <source>Application Context</source>
                        </trans-unit>
+                       <trans-unit id="toolbarItems.sysinfo.composerMode">
+                               <source>Composer mode</source>
+                       </trans-unit>
                        <trans-unit id="toolbarItems.sysinfo.gitrevision">
                                <source>GIT Revision</source>
                        </trans-unit>