[BUGFIX] Add missing interface to AdminPanel Cache Module 88/59688/3
authorFrank Naegler <frank.naegler@typo3.org>
Wed, 13 Feb 2019 08:32:03 +0000 (09:32 +0100)
committerMarkus Klein <markus.klein@typo3.org>
Wed, 13 Feb 2019 09:18:46 +0000 (10:18 +0100)
The AdminPanel Cache Module has to implement the
ResourceProviderInterface to load the required JavaScript module.

Resolves: #87701
Releases: master, 9.5
Change-Id: Ib8c440bc5847da64aad480dc98adda7b440f4bf9
Reviewed-on: https://review.typo3.org/59688
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: TYPO3com <noreply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/adminpanel/Classes/Modules/CacheModule.php

index 5000d37..281fc78 100644 (file)
@@ -20,12 +20,13 @@ use Psr\Http\Message\ServerRequestInterface;
 use TYPO3\CMS\Adminpanel\ModuleApi\AbstractModule;
 use TYPO3\CMS\Adminpanel\ModuleApi\InitializableInterface;
 use TYPO3\CMS\Adminpanel\ModuleApi\PageSettingsProviderInterface;
+use TYPO3\CMS\Adminpanel\ModuleApi\ResourceProviderInterface;
 use TYPO3\CMS\Backend\Routing\UriBuilder;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Fluid\View\StandaloneView;
 use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
 
-class CacheModule extends AbstractModule implements PageSettingsProviderInterface, InitializableInterface
+class CacheModule extends AbstractModule implements PageSettingsProviderInterface, InitializableInterface, ResourceProviderInterface
 {
     /**
      * @return string
@@ -108,4 +109,16 @@ class CacheModule extends AbstractModule implements PageSettingsProviderInterfac
     {
         return ['EXT:adminpanel/Resources/Public/JavaScript/Modules/Cache.js'];
     }
+
+    /**
+     * Returns a string array with css files that will be rendered after the module
+     *
+     * Example: return ['EXT:adminpanel/Resources/Public/JavaScript/Modules/Edit.css'];
+     *
+     * @return array
+     */
+    public function getCssFiles(): array
+    {
+        return [];
+    }
 }