[TASK] Make sysext filelist an extbase module 44/42644/9
authorAlexander Schnitzler <git@alexanderschnitzler.de>
Sat, 15 Aug 2015 12:56:48 +0000 (14:56 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Mon, 17 Aug 2015 18:47:22 +0000 (20:47 +0200)
Currently the filelist module is not yet an extbase
module. To be able to adjust the module in the future
more easily the module will be based on extbase.

Releases: master
Resolves: #69083
Change-Id: I74884cd554272b68ab80509b7548647ff01632d6
Reviewed-on: http://review.typo3.org/42644
Reviewed-by: Carsten Bleicker <carsten@bleicker.de>
Tested-by: Carsten Bleicker <carsten@bleicker.de>
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
15 files changed:
typo3/sysext/backend/Classes/Controller/File/CreateFolderController.php
typo3/sysext/backend/Classes/Controller/File/EditFileController.php
typo3/sysext/backend/Classes/Controller/File/RenameFileController.php
typo3/sysext/backend/Classes/Controller/File/ReplaceFileController.php
typo3/sysext/filelist/Classes/Controller/FileListController.php
typo3/sysext/filelist/Classes/FileList.php
typo3/sysext/filelist/Classes/ViewHelpers/Be/ContainerViewHelper.php [new file with mode: 0644]
typo3/sysext/filelist/Modules/Filelist/index.php [deleted file]
typo3/sysext/filelist/Resources/Private/Layouts/Default.html [new file with mode: 0644]
typo3/sysext/filelist/Resources/Private/Templates/FileList/Index.html [new file with mode: 0644]
typo3/sysext/filelist/Resources/Private/Templates/FileList/MissingFolder.html [new file with mode: 0644]
typo3/sysext/filelist/Resources/Private/Templates/file_list.html [deleted file]
typo3/sysext/filelist/ext_tables.php
typo3/sysext/install/Classes/Updates/FileListIsStartModuleUpdate.php [new file with mode: 0644]
typo3/sysext/install/ext_localconf.php

index 74cfe92..c64394a 100644 (file)
@@ -118,14 +118,14 @@ class CreateFolderController implements \TYPO3\CMS\Core\Http\ControllerInterface
                $this->doc->JScode = $this->doc->wrapScriptTags('
                        var path = "' . $this->target . '";
 
-                       function reload(a) {    //
+                       function reload(a) {
                                if (!changed || (changed && confirm(' . GeneralUtility::quoteJSvalue($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:mess.redraw')) . '))) {
                                        var params = "&target="+encodeURIComponent(path)+"&number="+a+"&returnUrl=' . rawurlencode($this->returnUrl) . '";
                                        window.location.href = ' . GeneralUtility::quoteJSvalue(BackendUtility::getModuleUrl('file_newfolder')) . '+params;
                                }
                        }
-                       function backToList() { //
-                               top.goToModule("file_list");
+                       function backToList() {
+                               top.goToModule("file_FilelistList");
                        }
 
                        var changed = 0;
index 53d7e8e..212c4f6 100644 (file)
@@ -121,8 +121,8 @@ class EditFileController implements \TYPO3\CMS\Core\Http\ControllerInterface {
                $this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
                $this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/file_edit.html');
                $this->doc->JScode = $this->doc->wrapScriptTags('
-                       function backToList() { //
-                               top.goToModule("file_list");
+                       function backToList() {
+                               top.goToModule("file_FilelistList");
                        }
                ');
                $this->doc->form = '<form action="' . htmlspecialchars(BackendUtility::getModuleUrl('tce_file')) . '" method="post" name="editform">';
index 145eb02..843060b 100644 (file)
@@ -25,24 +25,26 @@ use TYPO3\CMS\Core\Http\Response;
  */
 class RenameFileController implements \TYPO3\CMS\Core\Http\ControllerInterface {
 
-       // Internal, static:
        /**
         * Document template object
         *
         * @var \TYPO3\CMS\Backend\Template\DocumentTemplate
+        * @internal
         */
        public $doc;
 
-       // Name of the filemount
        /**
+        * Name of the filemount
+        *
         * @var string
         */
        public $title;
 
-       // Internal, static (GPVar):
-       // Set with the target path inputted in &target
        /**
+        * Target path
+        *
         * @var string
+        * @internal
         */
        public $target;
 
@@ -53,16 +55,18 @@ class RenameFileController implements \TYPO3\CMS\Core\Http\ControllerInterface {
         */
        protected $fileOrFolderObject;
 
-       // Return URL of list module.
        /**
+        * Return URL of list module.
+        *
         * @var string
         */
        public $returnUrl;
 
-       // Internal, dynamic:
-       // Accumulating content
        /**
+        * Accumulating content
+        *
         * @var string
+        * @internal
         */
        public $content;
 
@@ -114,8 +118,8 @@ class RenameFileController implements \TYPO3\CMS\Core\Http\ControllerInterface {
                $this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
                $this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/file_rename.html');
                $this->doc->JScode = $this->doc->wrapScriptTags('
-                       function backToList() { //
-                               top.goToModule("file_list");
+                       function backToList() {
+                               top.goToModule("file_FilelistList");
                        }
                ');
        }
index 96f82cc..5026701 100644 (file)
@@ -124,8 +124,8 @@ class ReplaceFileController implements \TYPO3\CMS\Core\Http\ControllerInterface
                $this->doc = GeneralUtility::makeInstance(DocumentTemplate::class);
                $this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/file_replace.html');
                $this->doc->JScode = $this->doc->wrapScriptTags('
-                       function backToList() { //
-                               top.goToModule("file_list");
+                       function backToList() {
+                               top.goToModule("file_FilelistList");
                        }
                ');
        }
index 0d3fbf2..cfc27ef 100644 (file)
@@ -22,6 +22,7 @@ use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Page\PageRenderer;
 use TYPO3\CMS\Core\Resource\Exception;
+use TYPO3\CMS\Core\Resource\Folder;
 use TYPO3\CMS\Core\Resource\ResourceFactory;
 use TYPO3\CMS\Core\Resource\Utility\ListUtility;
 use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
@@ -33,14 +34,14 @@ use TYPO3\CMS\Filelist\FileList;
 /**
  * Script Class for creating the list of files in the File > Filelist module
  */
-class FileListController {
+class FileListController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController {
 
        /**
-       * Module configuration
-       *
-       * @var array
-       * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8. The Module gets configured by ExtensionManagementUtility::addModule() in ext_tables.php
-       */
+        * Module configuration
+        *
+        * @var array
+        * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8. The Module gets configured by ExtensionManagementUtility::addModule() in ext_tables.php
+        */
        public $MCONF = array();
 
        /**
@@ -54,13 +55,6 @@ class FileListController {
        public $MOD_SETTINGS = array();
 
        /**
-        * Accumulated HTML output
-        *
-        * @var string
-        */
-       public $content;
-
-       /**
         * Document template object
         *
         * @var DocumentTemplate
@@ -75,7 +69,7 @@ class FileListController {
        public $id;
 
        /**
-        * @var \TYPO3\CMS\Core\Resource\Folder
+        * @var Folder
         */
        protected $folderObject;
 
@@ -132,14 +126,6 @@ class FileListController {
        protected $moduleName = 'file_list';
 
        /**
-        * Constructor
-        */
-       public function __construct() {
-               $this->getLanguageService()->includeLLFile('EXT:lang/locallang_mod_file_list.xlf');
-               $this->getLanguageService()->includeLLFile('EXT:lang/locallang_misc.xlf');
-       }
-
-       /**
         * Initialize variables, file object
         * Incoming GET vars include id, pointer, table, imagemode
         *
@@ -147,7 +133,11 @@ class FileListController {
         * @throws \RuntimeException
         * @throws Exception\InsufficientFolderAccessPermissionsException
         */
-       public function init() {
+       public function initializeObject() {
+               $this->doc = GeneralUtility::makeInstance(DocumentTemplate::class);
+               $this->getLanguageService()->includeLLFile('EXT:lang/locallang_mod_file_list.xlf');
+               $this->getLanguageService()->includeLLFile('EXT:lang/locallang_misc.xlf');
+
                // Setting GPvars:
                $this->id = ($combinedIdentifier = GeneralUtility::_GP('id'));
                $this->pointer = GeneralUtility::_GP('pointer');
@@ -267,48 +257,53 @@ class FileListController {
        }
 
        /**
-        * Main function, creating the listing
-        *
         * @return void
         */
-       public function main() {
-               // Initialize the template object
-               $this->doc = GeneralUtility::makeInstance(DocumentTemplate::class);
-               $this->doc->setModuleTemplate('EXT:filelist/Resources/Private/Templates/file_list.html');
+       public function initializeIndexAction() {
+               // Apply predefined values for hidden checkboxes
+               // Set predefined value for DisplayBigControlPanel:
+               $backendUser = $this->getBackendUser();
+               if ($backendUser->getTSConfigVal('options.file_list.enableDisplayBigControlPanel') === 'activated') {
+                       $this->MOD_SETTINGS['bigControlPanel'] = TRUE;
+               } elseif ($backendUser->getTSConfigVal('options.file_list.enableDisplayBigControlPanel') === 'deactivated') {
+                       $this->MOD_SETTINGS['bigControlPanel'] = FALSE;
+               }
+               // Set predefined value for DisplayThumbnails:
+               if ($backendUser->getTSConfigVal('options.file_list.enableDisplayThumbnails') === 'activated') {
+                       $this->MOD_SETTINGS['displayThumbs'] = TRUE;
+               } elseif ($backendUser->getTSConfigVal('options.file_list.enableDisplayThumbnails') === 'deactivated') {
+                       $this->MOD_SETTINGS['displayThumbs'] = FALSE;
+               }
+               // Set predefined value for Clipboard:
+               if ($backendUser->getTSConfigVal('options.file_list.enableClipBoard') === 'activated') {
+                       $this->MOD_SETTINGS['clipBoard'] = TRUE;
+               } elseif ($backendUser->getTSConfigVal('options.file_list.enableClipBoard') === 'deactivated') {
+                       $this->MOD_SETTINGS['clipBoard'] = FALSE;
+               }
+               // If user never opened the list module, set the value for displayThumbs
+               if (!isset($this->MOD_SETTINGS['displayThumbs'])) {
+                       $this->MOD_SETTINGS['displayThumbs'] = $backendUser->uc['thumbnailsByDefault'];
+               }
+               if (!isset($this->MOD_SETTINGS['sort'])) {
+                       // Set default sorting
+                       $this->MOD_SETTINGS['sort'] = 'file';
+                       $this->MOD_SETTINGS['reverse'] = 0;
+               }
+       }
 
-               $pageRenderer = $this->getPageRenderer();
-               $pageRenderer->loadJQuery();
-               $pageRenderer->loadRequireJsModule('TYPO3/CMS/Filelist/FileListLocalisation');
+       /**
+        * @return void
+        */
+       public function indexAction() {
 
                // There there was access to this file path, continue, make the list
                if ($this->folderObject) {
 
+                       $requireJsModules = ['TYPO3/CMS/Filelist/FileListLocalisation'];
+                       $addJsInlineLabels = [];
+
                        // Create filelisting object
-                       $this->filelist = GeneralUtility::makeInstance(FileList::class);
-                       // Apply predefined values for hidden checkboxes
-                       // Set predefined value for DisplayBigControlPanel:
-                       $backendUser = $this->getBackendUser();
-                       if ($backendUser->getTSConfigVal('options.file_list.enableDisplayBigControlPanel') === 'activated') {
-                               $this->MOD_SETTINGS['bigControlPanel'] = TRUE;
-                       } elseif ($backendUser->getTSConfigVal('options.file_list.enableDisplayBigControlPanel') === 'deactivated') {
-                               $this->MOD_SETTINGS['bigControlPanel'] = FALSE;
-                       }
-                       // Set predefined value for DisplayThumbnails:
-                       if ($backendUser->getTSConfigVal('options.file_list.enableDisplayThumbnails') === 'activated') {
-                               $this->MOD_SETTINGS['displayThumbs'] = TRUE;
-                       } elseif ($backendUser->getTSConfigVal('options.file_list.enableDisplayThumbnails') === 'deactivated') {
-                               $this->MOD_SETTINGS['displayThumbs'] = FALSE;
-                       }
-                       // Set predefined value for Clipboard:
-                       if ($backendUser->getTSConfigVal('options.file_list.enableClipBoard') === 'activated') {
-                               $this->MOD_SETTINGS['clipBoard'] = TRUE;
-                       } elseif ($backendUser->getTSConfigVal('options.file_list.enableClipBoard') === 'deactivated') {
-                               $this->MOD_SETTINGS['clipBoard'] = FALSE;
-                       }
-                       // If user never opened the list module, set the value for displayThumbs
-                       if (!isset($this->MOD_SETTINGS['displayThumbs'])) {
-                               $this->MOD_SETTINGS['displayThumbs'] = $backendUser->uc['thumbnailsByDefault'];
-                       }
+                       $this->filelist = GeneralUtility::makeInstance(FileList::class, $this);
                        $this->filelist->thumbs = $this->MOD_SETTINGS['displayThumbs'];
                        // Create clipboard object and initialize that
                        $this->filelist->clipObj = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Clipboard\Clipboard::class);
@@ -355,20 +350,13 @@ class FileListController {
                                        $fileProcessor->pushErrorMessagesToFlashMessageQueue();
                                }
                        }
-                       if (!isset($this->MOD_SETTINGS['sort'])) {
-                               // Set default sorting
-                               $this->MOD_SETTINGS['sort'] = 'file';
-                               $this->MOD_SETTINGS['reverse'] = 0;
-                       }
                        // Start up filelisting object, include settings.
                        $this->pointer = MathUtility::forceIntegerInRange($this->pointer, 0, 100000);
                        $this->filelist->start($this->folderObject, $this->pointer, $this->MOD_SETTINGS['sort'], $this->MOD_SETTINGS['reverse'], $this->MOD_SETTINGS['clipBoard'], $this->MOD_SETTINGS['bigControlPanel']);
                        // Generate the list
                        $this->filelist->generateList();
                        // Set top JavaScript:
-                       $this->doc->JScode = $this->doc->wrapScriptTags('if (top.fsMod) top.fsMod.recentIds["file"] = "' . rawurlencode($this->id) . '";' . $this->filelist->CBfunctions());
-                       // This will return content necessary for the context sensitive clickmenus to work: bodytag events, JavaScript functions and DIV-layers.
-                       $this->doc->getContextMenuCode();
+                       $addJsInline = 'if (top.fsMod) top.fsMod.recentIds["file"] = "' . rawurlencode($this->id) . '";' . $this->filelist->CBfunctions();
                        // Setting up the buttons and markers for docheader
                        list($buttons, $otherMarkers) = $this->filelist->getButtonsAndOtherMarkers($this->folderObject);
                        // add the folder info to the marker array
@@ -379,86 +367,55 @@ class FileListController {
                        if ($this->folderObject->getStorage()->checkUserActionPermission('add', 'File')
                                && $this->folderObject->checkActionPermission('write')
                        ) {
-                               $pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/DragUploader');
-                               $pageRenderer->addInlineLanguagelabelFile(
-                                       ExtensionManagementUtility::extPath('lang') . 'locallang_core.xlf',
-                                       'file_upload'
-                               );
+                               $requireJsModules[] = 'TYPO3/CMS/Backend/DragUploader';
+                               $addJsInlineLabelFiles[] = [
+                                       'file' => ExtensionManagementUtility::extPath('lang') . 'locallang_core.xlf',
+                                       'prefix' => 'file_upload'
+                               ];
                        }
 
-                       // Build the <body> for the module
-                       $moduleHeadline = $this->getModuleHeadline();
-                       // Create output
-                       $pageContent = $moduleHeadline !== '' ? '<h1>' . $moduleHeadline . '</h1>' : '';
-
-                       $pageContent .= '<form action="' . htmlspecialchars($this->filelist->listURL()) . '" method="post" name="dblistForm">';
-                       $pageContent .= $this->filelist->HTMLcode;
-                       $pageContent .= '<input type="hidden" name="cmd" /></form>';
-
-                       // Making listing options:
-                       if ($this->filelist->HTMLcode) {
-                               $pageContent .= '
-
-                                       <!--
-                                               Listing options for extended view, clipboard and thumbnails
-                                       -->
-                                       <div class="typo3-listOptions">
-                               ';
-                               // Add "display bigControlPanel" checkbox:
-                               if ($backendUser->getTSConfigVal('options.file_list.enableDisplayBigControlPanel') === 'selectable') {
-                                       $pageContent .= '<div class="checkbox">' .
-                                               '<label for="bigControlPanel">' .
-                                                       BackendUtility::getFuncCheck($this->id, 'SET[bigControlPanel]', $this->MOD_SETTINGS['bigControlPanel'], '', '', 'id="bigControlPanel"') .
-                                                       $this->getLanguageService()->getLL('bigControlPanel', TRUE) .
-                                               '</label>' .
-                                       '</div>';
-                               }
-                               // Add "display thumbnails" checkbox:
-                               if ($backendUser->getTSConfigVal('options.file_list.enableDisplayThumbnails') === 'selectable') {
-                                       $pageContent .= '<div class="checkbox">' .
-                                               '<label for="checkDisplayThumbs">' .
-                                                       BackendUtility::getFuncCheck($this->id, 'SET[displayThumbs]', $this->MOD_SETTINGS['displayThumbs'], '', '', 'id="checkDisplayThumbs"') .
-                                                       $this->getLanguageService()->getLL('displayThumbs', TRUE) .
-                                               '</label>' .
-                                       '</div>';
-                               }
-                               // Add "clipboard" checkbox:
-                               if ($backendUser->getTSConfigVal('options.file_list.enableClipBoard') === 'selectable') {
-                                       $pageContent .= '<div class="checkbox">' .
-                                               '<label for="checkClipBoard">' .
-                                                       BackendUtility::getFuncCheck($this->id, 'SET[clipBoard]', $this->MOD_SETTINGS['clipBoard'], '', '', 'id="checkClipBoard"') .
-                                                       $this->getLanguageService()->getLL('clipBoard', TRUE) .
-                                               '</label>' .
-                                       '</div>';
-                               }
-                               $pageContent .= '
-                                       </div>
-                               ';
-                               // Set clipboard:
-                               if ($this->MOD_SETTINGS['clipBoard']) {
-                                       $pageContent .= $this->filelist->clipObj->printClipboard();
-                                       $pageContent .= BackendUtility::cshItem('xMOD_csh_corebe', 'filelist_clipboard');
-                               }
-                       }
-                       $markerArray = array(
-                               'CSH' => $docHeaderButtons['csh'],
-                               'FUNC_MENU' => BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']),
-                               'CONTENT' => ($this->errorMessage ? $this->errorMessage->render() : '') . $pageContent,
-                               'FOLDER_IDENTIFIER' => $this->folderObject->getCombinedIdentifier(),
-                               'FILEDENYPATERN' => $GLOBALS['TYPO3_CONF_VARS']['BE']['fileDenyPattern'],
-                               'MAXFILESIZE' => GeneralUtility::getMaxUploadFileSize() * 1024,
-                       );
-                       $this->content = $this->doc->moduleBody(array(), $docHeaderButtons, array_merge($markerArray, $otherMarkers));
-                       // Renders the module page
-                       $this->content = $this->doc->render($this->getLanguageService()->getLL('files'), $this->content);
+                       $this->view->assign('otherMarkers', $otherMarkers);
+                       $this->view->assign('docHeaderButtons', $docHeaderButtons);
+                       $this->view->assign('pageTitle', $this->getLanguageService()->getLL('files'));
+                       $this->view->assign('requireJsModules', $requireJsModules);
+                       $this->view->assign('addJsInlineLabelFiles', $addJsInlineLabelFiles);
+                       $this->view->assign('addJsInline', $addJsInline);
+                       $this->view->assign('headline', $this->getModuleHeadline());
+                       $this->view->assign('listHtml', $this->filelist->HTMLcode);
+                       $this->view->assign('checkboxes', [
+                               'bigControlPanel' => [
+                                       'enabled' => $this->getBackendUser()->getTSConfigVal('options.file_list.enableDisplayBigControlPanel') === 'selectable',
+                                       'label' => $this->getLanguageService()->getLL('bigControlPanel', TRUE),
+                                       'html' => BackendUtility::getFuncCheck($this->id, 'SET[bigControlPanel]', $this->MOD_SETTINGS['bigControlPanel'], '', '', 'id="bigControlPanel"'),
+                               ],
+                               'displayThumbs' => [
+                                       'enabled' => $this->getBackendUser()->getTSConfigVal('options.file_list.enableDisplayThumbnails') === 'selectable',
+                                       'label' => $this->getLanguageService()->getLL('displayThumbs', TRUE),
+                                       'html' => BackendUtility::getFuncCheck($this->id, 'SET[displayThumbs]', $this->MOD_SETTINGS['displayThumbs'], '', '', 'id="checkDisplayThumbs"'),
+                               ],
+                               'enableClipBoard' => [
+                                       'enabled' => $this->getBackendUser()->getTSConfigVal('options.file_list.enableClipBoard') === 'selectable',
+                                       'label' => $this->getLanguageService()->getLL('clipBoard', TRUE),
+                                       'html' => BackendUtility::getFuncCheck($this->id, 'SET[clipBoard]', $this->MOD_SETTINGS['clipBoard'], '', '', 'id="checkClipBoard"'),
+                               ]
+                       ]);
+                       $this->view->assign('showClipBoard', (bool)$this->MOD_SETTINGS['clipBoard']);
+                       $this->view->assign('clipBoardHtml', $this->filelist->clipObj->printClipboard());
+                       $this->view->assign('folderIdentifier', $this->folderObject->getCombinedIdentifier());
+                       $this->view->assign('fileDenyPattern', $GLOBALS['TYPO3_CONF_VARS']['BE']['fileDenyPattern']);
+                       $this->view->assign('maxFileSize', GeneralUtility::getMaxUploadFileSize() * 1024);
                } else {
-                       $content = '';
-                       if ($this->errorMessage) {
-                               $this->errorMessage->setSeverity(FlashMessage::ERROR);
-                               $content = $this->doc->moduleBody(array(), array_merge(array('REFRESH' => '', 'PASTE' => '', 'LEVEL_UP' => ''), $this->getButtons()), array('CSH' => '', 'TITLE' => '', 'FOLDER_INFO' => '', 'PAGE_ICON' => '', 'FUNC_MENU' => '', 'CONTENT' => $this->errorMessage->render()));
-                       }
-                       // Create output - no access (no warning though)
-                       $this->content = $this->doc->render($this->getLanguageService()->getLL('files'), $content);
+                       $this->forward('missingFolder');
+               }
+       }
+
+       /**
+        * @return void
+        */
+       public function missingFolderAction() {
+               if ($this->errorMessage) {
+                       $this->errorMessage->setSeverity(FlashMessage::ERROR);
+                       $this->controllerContext->getFlashMessageQueue('core.template.flashMessages')->addMessage($this->errorMessage);
                }
        }
 
@@ -485,15 +442,6 @@ class FileListController {
        }
 
        /**
-        * Outputting the accumulated content to screen
-        *
-        * @return void
-        */
-       public function printContent() {
-               echo $this->content;
-       }
-
-       /**
         * Create the panel of buttons for submitting the form or otherwise perform operations.
         *
         * @return array All available buttons as an assoc. array
@@ -558,12 +506,4 @@ class FileListController {
        protected function getBackendUser() {
                return $GLOBALS['BE_USER'];
        }
-
-       /**
-        * @return PageRenderer
-        */
-       protected function getPageRenderer() {
-               return GeneralUtility::makeInstance(PageRenderer::class);
-       }
-
 }
index 477da1d..b11391e 100644 (file)
@@ -32,6 +32,7 @@ use TYPO3\CMS\Core\Resource\Utility\ListUtility;
 use TYPO3\CMS\Core\Type\Bitmask\JsConfirmation;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Resource\FolderInterface;
+use TYPO3\CMS\Filelist\Controller\FileListController;
 
 /**
  * Class for rendering of File>Filelist
@@ -67,11 +68,6 @@ class FileList extends AbstractRecordList {
        public $fixedL = 30;
 
        /**
-        * @var string
-        */
-       public $script = '';
-
-       /**
         * If TRUE click menus are generated on files and folders
         *
         * @var bool
@@ -182,9 +178,15 @@ class FileList extends AbstractRecordList {
        protected $iconFactory;
 
        /**
+        * @var FileListController
+        */
+       protected $fileListController;
+
+       /**
         * Construct
         */
-       public function __construct() {
+       public function __construct(FileListController $fileListController) {
+               $this->fileListController = $fileListController;
                $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
        }
 
@@ -200,7 +202,6 @@ class FileList extends AbstractRecordList {
         * @return void
         */
        public function start(Folder $folderObject, $pointer, $sort, $sortRev, $clipBoard = FALSE, $bigControlPanel = FALSE) {
-               $this->script = BackendUtility::getModuleUrl('file_list');
                $this->folderObject = $folderObject;
                $this->counter = 0;
                $this->totalbytes = 0;
@@ -261,7 +262,7 @@ class FileList extends AbstractRecordList {
                                $otherMarkers['TITLE'] .= htmlspecialchars(GeneralUtility::fixed_lgd_cs($title, -($this->fixedL + 20)));
                        }
                        if ($this->clickMenus) {
-                               $otherMarkers['PAGE_ICON'] = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($otherMarkers['PAGE_ICON'], $folderObject->getCombinedIdentifier());
+                               $otherMarkers['PAGE_ICON'] = $this->fileListController->doc->wrapClickMenuOnIcon($otherMarkers['PAGE_ICON'], $folderObject->getCombinedIdentifier());
                        }
                        // Add paste button if clipboard is initialized
                        if ($this->clipObj instanceof Clipboard && $folderObject->checkActionPermission('write')) {
@@ -523,7 +524,7 @@ class FileList extends AbstractRecordList {
                        // The icon with link
                        $theIcon = IconUtility::getSpriteIconForResource($folderObject, array('title' => $folderName));
                        if (!$isLocked && $this->clickMenus) {
-                               $theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($theIcon, $folderObject->getCombinedIdentifier());
+                               $theIcon = $this->fileListController->doc->wrapClickMenuOnIcon($theIcon, $folderObject->getCombinedIdentifier());
                        }
 
                        // Preparing and getting the data-array
@@ -584,7 +585,7 @@ class FileList extends AbstractRecordList {
         * @return string HTML
         */
        public function linkWrapDir($title, Folder $folderObject) {
-               $href = $this->script . '&id=' . rawurlencode($folderObject->getCombinedIdentifier());
+               $href = BackendUtility::getModuleUrl('file_FilelistList', ['id' => $folderObject->getCombinedIdentifier()]);
                $onclick = ' onclick="' . htmlspecialchars(('top.document.getElementsByName("navigation")[0].contentWindow.Tree.highlightActiveItem("file","folder' . GeneralUtility::md5int($folderObject->getCombinedIdentifier()) . '_"+top.fsMod.currentBank)')) . '"';
                // Sometimes $code contains plain HTML tags. In such a case the string should not be modified!
                if ((string)$title === strip_tags($title)) {
@@ -659,7 +660,7 @@ class FileList extends AbstractRecordList {
                        // The icon with link
                        $theIcon = IconUtility::getSpriteIconForResource($fileObject, array('title' => $fileName . ' [' . (int)$fileObject->getUid() . ']'));
                        if ($this->clickMenus) {
-                               $theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($theIcon, $fileObject->getCombinedIdentifier());
+                               $theIcon = $this->fileListController->doc->wrapClickMenuOnIcon($theIcon, $fileObject->getCombinedIdentifier());
                        }
                        // Preparing and getting the data-array
                        $theData = array();
@@ -708,7 +709,7 @@ class FileList extends AbstractRecordList {
                                                                                'returnUrl' => $this->listURL()
                                                                        ];
                                                                        $returnUrl = BackendUtility::getModuleUrl('record_edit', $parameters) . BackendUtility::getUrlToken('editRecord');
-                                                                       $href = $GLOBALS['SOBE']->doc->issueCommand(
+                                                                       $href = $this->fileListController->doc->issueCommand(
                                                                                '&cmd[sys_file_metadata][' . $metaDataRecord['uid'] . '][localize]=' . $languageId,
                                                                                $returnUrl
                                                                        );
@@ -803,15 +804,17 @@ class FileList extends AbstractRecordList {
         * @return string HTML
         */
        public function linkWrapSort($code, $folderIdentifier, $col) {
+               $params = ['id' => $folderIdentifier, 'SET' => [ 'sort' => $col ]];
+
                if ($this->sort === $col) {
                        // Check reverse sorting
-                       $params = '&SET[sort]=' . $col . '&SET[reverse]=' . ($this->sortRev ? '0' : '1');
+                       $params['SET']['reverse'] = ($this->sortRev ? '0' : '1');
                        $sortArrow = IconUtility::getSpriteIcon('status-status-sorting-light-' . ($this->sortRev ? 'desc' : 'asc'));
                } else {
-                       $params = '&SET[sort]=' . $col . '&SET[reverse]=0';
+                       $params['SET']['reverse'] = 0;
                        $sortArrow = '';
                }
-               $href = GeneralUtility::resolveBackPath($this->script) . '&id=' . rawurlencode($folderIdentifier) . $params;
+               $href = BackendUtility::getModuleUrl('file_FilelistList', $params);
                return '<a href="' . htmlspecialchars($href) . '">' . $code . ' ' . $sortArrow . '</a>';
        }
 
@@ -1002,6 +1005,7 @@ class FileList extends AbstractRecordList {
 
        /**
         * Returns the database connection
+        *
         * @return DatabaseConnection
         */
        protected function getDatabaseConnection() {
diff --git a/typo3/sysext/filelist/Classes/ViewHelpers/Be/ContainerViewHelper.php b/typo3/sysext/filelist/Classes/ViewHelpers/Be/ContainerViewHelper.php
new file mode 100644 (file)
index 0000000..601d3f5
--- /dev/null
@@ -0,0 +1,74 @@
+<?php
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+namespace TYPO3\CMS\Filelist\ViewHelpers\Be;
+
+/**
+ * View helper which allows you to create extbase based modules in the style of TYPO3 default modules.
+ *
+ * = Examples =
+ *
+ * <code title="Simple">
+ * <f:be.container>your module content</f:be.container>
+ * </code>
+ * <output>
+ * "your module content" wrapped with proper head & body tags.
+ * Default backend CSS styles and JavaScript will be included
+ * </output>
+ *
+ * <code title="All options">
+ * <f:be.container pageTitle="foo" enableClickMenu="false" loadExtJs="true" loadExtJsTheme="false" extJsAdapter="jQuery" enableExtJsDebug="true" loadJQuery="true" includeCssFiles="0: '{f:uri.resource(path:\'Css/Styles.css\')}'" includeJsFiles="0: '{f:uri.resource(path:\'JavaScript/Library1.js\')}', 1: '{f:uri.resource(path:\'JavaScript/Library2.js\')}'" addJsInlineLabels="{0: 'label1', 1: 'label2'}" includeCsh="true">your module content</f:be.container>
+ * </code>
+ * <output>
+ * "your module content" wrapped with proper head & body tags.
+ * Custom CSS file EXT:your_extension/Resources/Public/Css/styles.css and
+ * JavaScript files EXT:your_extension/Resources/Public/JavaScript/Library1.js and EXT:your_extension/Resources/Public/JavaScript/Library2.js
+ * will be loaded, plus ExtJS and jQuery and some inline labels for usage in JS code.
+ * </output>
+ */
+class ContainerViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Be\ContainerViewHelper {
+
+       /**
+        * Render start page with \TYPO3\CMS\Backend\Template\DocumentTemplate and pageTitle
+        *
+        * @param string $pageTitle title tag of the module. Not required by default, as BE modules are shown in a frame
+        * @param bool $enableClickMenu If TRUE, loads clickmenu.js required by BE context menus. Defaults to TRUE
+        * @param bool $loadExtJs specifies whether to load ExtJS library. Defaults to FALSE
+        * @param bool $loadExtJsTheme whether to load ExtJS "grey" theme. Defaults to FALSE
+        * @param bool $enableExtJsDebug if TRUE, debug version of ExtJS is loaded. Use this for development only
+        * @param bool $loadJQuery whether to load jQuery library. Defaults to FALSE
+        * @param array $includeCssFiles List of custom CSS file to be loaded
+        * @param array $includeJsFiles List of custom JavaScript file to be loaded
+        * @param array $addJsInlineLabels Custom labels to add to JavaScript inline labels
+        * @param bool $includeCsh flag for including CSH
+        * @param array $includeRequireJsModules List of RequireJS modules to be loaded
+        * @param array $addJsInlineLabelFiles List of files containing custom labels to add to JavaScript inline labels
+        * @param string $addJsInline Custom inline JavaScript
+        * @return string
+        * @see \TYPO3\CMS\Backend\Template\DocumentTemplate
+        * @see \TYPO3\CMS\Core\Page\PageRenderer
+        */
+       public function render($pageTitle = '', $enableClickMenu = TRUE, $loadExtJs = FALSE, $loadExtJsTheme = TRUE, $enableExtJsDebug = FALSE, $loadJQuery = FALSE, $includeCssFiles = NULL, $includeJsFiles = NULL, $addJsInlineLabels = NULL, $includeCsh = TRUE, $includeRequireJsModules = NULL, $addJsInlineLabelFiles = NULL, $addJsInline = NULL) {
+               if (is_array($addJsInlineLabelFiles)) {
+                       foreach ($addJsInlineLabelFiles as $addJsInlineLabelFile) {
+                               $this->getPageRenderer()->addInlineLanguageLabelFile($addJsInlineLabelFile['file'], $addJsInlineLabelFile['prefix']);
+                       }
+               }
+
+               $content = parent::render($pageTitle, $enableClickMenu, $loadExtJs, $loadExtJsTheme, $enableExtJsDebug, $loadJQuery, $includeCssFiles, $includeJsFiles, $addJsInlineLabels, $includeCsh, $includeRequireJsModules);
+
+               $doc = $this->getDocInstance();
+               $doc->JScode .= $doc->wrapScriptTags($addJsInline);
+               return $doc->insertStylesAndJS($content);
+       }
+}
diff --git a/typo3/sysext/filelist/Modules/Filelist/index.php b/typo3/sysext/filelist/Modules/Filelist/index.php
deleted file mode 100644 (file)
index 631c26c..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Web>File: Filelisting
- */
-$GLOBALS['SOBE'] = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Filelist\Controller\FileListController::class);
-$GLOBALS['SOBE']->init();
-$GLOBALS['SOBE']->main();
-$GLOBALS['SOBE']->printContent();
diff --git a/typo3/sysext/filelist/Resources/Private/Layouts/Default.html b/typo3/sysext/filelist/Resources/Private/Layouts/Default.html
new file mode 100644 (file)
index 0000000..0d0c2e5
--- /dev/null
@@ -0,0 +1,35 @@
+{namespace fl = TYPO3\CMS\Filelist\ViewHelpers}
+
+<fl:be.container pageTitle="{pageTitle}" includeRequireJsModules="{requireJsModules}" addJsInlineLabelFiles="{addJsInlineLabelFiles}" addJsInline="{addJsInline}">
+       <div class="typo3-fullDoc t3js-drag-uploader" data-target-folder="{folderIdentifier}" data-progress-container="#typo3-filelist"
+                data-dropzone-trigger="#button-upload" data-dropzone-target="#typo3-inner-docbody h1:first"
+                data-file-deny-pattern="{fileDenyPattern}" data-max-file-size="{maxFileSize}">
+               <div id="typo3-docheader">
+                       <div class="typo3-docheader-functions">
+                               <div class="left">
+                                       <f:be.buttons.csh table="xMOD_csh_corebe" field="filelist_module" />
+                               </div>
+                               <div class="right">
+                                       {otherMarkers.TITLE} {otherMarkers.FOLDER_INFO} {otherMarkers.PAGE_ICON -> f:format.raw()}
+                               </div>
+                       </div>
+                       <div class="typo3-docheader-buttons">
+                               <div class="left">
+                                       {docHeaderButtons.level_up -> f:format.raw()}{docHeaderButtons.upload -> f:format.raw()}{docHeaderButtons.new -> f:format.raw()}{docHeaderButtons.PASTE -> f:format.raw()}
+                               </div>
+                               <div class="right">
+                                       {docHeaderButtons.refresh -> f:format.raw()}{f:be.buttons.shortcut()}
+                               </div>
+                       </div>
+               </div>
+               <div id="typo3-docbody">
+                       <div id="typo3-inner-docbody">
+                               <f:flashMessages queueIdentifier="core.template.flashMessages" />
+
+                               <f:render section="headline" />
+
+                               <f:render section="content" />
+                       </div>
+               </div>
+       </div>
+</fl:be.container>
diff --git a/typo3/sysext/filelist/Resources/Private/Templates/FileList/Index.html b/typo3/sysext/filelist/Resources/Private/Templates/FileList/Index.html
new file mode 100644 (file)
index 0000000..cd4b5a3
--- /dev/null
@@ -0,0 +1,51 @@
+<f:layout name="Default" />
+
+<f:section name="headline">
+       <h1>{headline}</h1>
+</f:section>
+
+<f:section name="content">
+
+       <f:form method="post" name="dblistForm">
+               {listHtml -> f:format.raw()}
+               <input type="hidden" name="cmd"/>
+       </f:form>
+
+       <f:if condition="{listHtml}">
+               <!--
+                       Listing options for extended view, clipboard and thumbnails
+               -->
+               <div class="typo3-listOptions">
+                       <f:if condition="{checkboxes.bigControlPanel.enabled}">
+                               <div class="checkbox">
+                                       <label for="bigControlPanel">
+                                               {checkboxes.bigControlPanel.html -> f:format.raw()}
+                                               {checkboxes.bigControlPanel.label}
+                                       </label>
+                               </div>
+                       </f:if>
+                       <f:if condition="{checkboxes.displayThumbs.enabled}">
+                               <div class="checkbox">
+                                       <label for="checkDisplayThumbs">
+                                               {checkboxes.displayThumbs.html -> f:format.raw()}
+                                               {checkboxes.displayThumbs.label}
+                                       </label>
+                               </div>
+                       </f:if>
+                       <f:if condition="{checkboxes.enableClipBoard.enabled}">
+                               <div class="checkbox">
+                                       <label for="checkClipBoard">
+                                               {checkboxes.enableClipBoard.html -> f:format.raw()}
+                                               {checkboxes.enableClipBoard.label}
+                                       </label>
+                               </div>
+                       </f:if>
+               </div>
+
+               <f:if condition="{showClipBoard}">
+                       {clipBoardHtml -> f:format.raw()}
+
+                       <f:be.buttons.csh table="xMOD_csh_corebe" field="filelist_clipboard" />
+               </f:if>
+       </f:if>
+</f:section>
diff --git a/typo3/sysext/filelist/Resources/Private/Templates/FileList/MissingFolder.html b/typo3/sysext/filelist/Resources/Private/Templates/FileList/MissingFolder.html
new file mode 100644 (file)
index 0000000..beaa451
--- /dev/null
@@ -0,0 +1,9 @@
+<f:layout name="Default" />
+
+<f:section name="headline">
+
+</f:section>
+
+<f:section name="content">
+
+</f:section>
diff --git a/typo3/sysext/filelist/Resources/Private/Templates/file_list.html b/typo3/sysext/filelist/Resources/Private/Templates/file_list.html
deleted file mode 100644 (file)
index f70bfc3..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<!-- ###FULLDOC### begin -->
-<div class="typo3-fullDoc t3js-drag-uploader" data-target-folder="###FOLDER_IDENTIFIER###" data-progress-container="#typo3-filelist"
-        data-dropzone-trigger="#button-upload" data-dropzone-target="#typo3-inner-docbody h1:first"
-        data-file-deny-pattern="###FILEDENYPATERN###" data-max-file-size="###MAXFILESIZE###">
-       <div id="typo3-docheader">
-               <div class="typo3-docheader-functions">
-                       <div class="left">###CSH### ###FUNC_MENU###</div>
-                       <div class="right">###TITLE### ###FOLDER_INFO### ###PAGE_ICON###</div>
-               </div>
-               <div class="typo3-docheader-buttons">
-                       <div class="left">###BUTTONLIST_LEFT###</div>
-                       <div class="right">###BUTTONLIST_RIGHT###</div>
-               </div>
-       </div>
-
-       <div id="typo3-docbody">
-               <div id="typo3-inner-docbody">
-                       ###CONTENT###
-               </div>
-       </div>
-</div>
-<!-- ###FULLDOC### end -->
-
-<!-- Grouping the icons on top -->
-
-<!-- ###BUTTON_GROUP_WRAP### -->
-<div class="buttongroup">###BUTTONS###</div>
-<!-- ###BUTTON_GROUP_WRAP### -->
-
-<!-- ###BUTTON_GROUPS_LEFT### -->
-<!-- ###BUTTON_GROUP4### -->###LEVEL_UP######UPLOAD######NEW######PASTE###<!-- ###BUTTON_GROUP4### -->
-<!-- ###BUTTON_GROUPS_LEFT### -->
-
-<!-- ###BUTTON_GROUPS_RIGHT### -->
-<!-- ###BUTTON_GROUP1### -->###REFRESH######SHORTCUT###<!-- ###BUTTON_GROUP1### -->
-<!-- ###BUTTON_GROUPS_RIGHT### -->
index 9fd1ef8..15a161f 100644 (file)
@@ -2,22 +2,19 @@
 defined('TYPO3_MODE') or die();
 
 if (TYPO3_MODE === 'BE') {
-       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule(
+       \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
+               'TYPO3.CMS.Filelist',
                'file',
                'list',
                '',
-               'EXT:filelist/Modules/Filelist/',
                array(
-                       'script' => '_DISPATCH',
+                       'FileList' => 'index',
+               ),
+               array(
                        'access' => 'user,group',
-                       'name' => 'file_list',
                        'workspaces' => 'online,custom',
-                       'labels' => array(
-                               'tabs_images' => array(
-                                       'tab' => 'EXT:filelist/Resources/Public/Icons/module-filelist.svg',
-                               ),
-                               'll_ref' => 'LLL:EXT:lang/locallang_mod_file_list.xlf',
-                       ),
+                       'icon' => 'EXT:filelist/Resources/Public/Icons/module-filelist.svg',
+                       'labels' => 'LLL:EXT:lang/locallang_mod_file_list.xlf'
                )
        );
 }
diff --git a/typo3/sysext/install/Classes/Updates/FileListIsStartModuleUpdate.php b/typo3/sysext/install/Classes/Updates/FileListIsStartModuleUpdate.php
new file mode 100644 (file)
index 0000000..e6d0ea6
--- /dev/null
@@ -0,0 +1,79 @@
+<?php
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+namespace TYPO3\CMS\Install\Updates;
+
+/**
+ * Class FileListIsStartModuleUpdate
+ * Update backend user setting startModule if set to "file_list"
+ *
+ * @package TYPO3\CMS\Install\Updates
+ */
+class FileListIsStartModuleUpdate extends AbstractUpdate {
+
+       /**
+        * @var string
+        */
+       protected $title = 'Update filelist user setting "startModule"';
+
+       /**
+        * Checks if an update is needed
+        *
+        * @param string &$description The description for the update
+        * @return bool Whether an update is needed (TRUE) or not (FALSE)
+        */
+       public function checkForUpdate(&$description) {
+               $backendUsersCount = $this->getDatabaseConnection()->exec_SELECTcountRows('uid', 'be_users');
+               if ($this->isWizardDone() || $backendUsersCount === 0) {
+                       return FALSE;
+               }
+
+               $description = 'The backend user setting startModule is changed for the extension filelist. Update all backend users that use ext:filelist as startModule.';
+
+               return TRUE;
+       }
+
+       /**
+        * Performs the database update if backend user's startmodule is file_list
+        *
+        * @param array &$databaseQueries Queries done in this update
+        * @param mixed &$customMessages Custom messages
+        * @return bool
+        */
+       public function performUpdate(array &$databaseQueries, &$customMessages) {
+               $db = $this->getDatabaseConnection();
+               $backendUsers = $db->exec_SELECTgetRows('uid,uc', 'be_users', '1=1');
+               if (!empty($backendUsers)) {
+                       foreach ($backendUsers as $backendUser) {
+                               if ($backendUser['uc'] !== NULL) {
+                                       $userConfig = unserialize($backendUser['uc']);
+                                       if ($userConfig['startModule'] === 'file_list') {
+                                               $userConfig['startModule'] = 'file_FilelistList';
+                                               $db->exec_UPDATEquery(
+                                                       'be_users',
+                                                       'uid=' . (int)$backendUser['uid'],
+                                                       array(
+                                                               'uc' => serialize($userConfig),
+                                                       )
+                                               );
+                                               $databaseQueries[] = $db->debug_lastBuiltQuery;
+                                       }
+                               }
+                       }
+               }
+
+               $this->markWizardAsDone();
+               return TRUE;
+       }
+}
index ef262cf..725fb45 100644 (file)
@@ -9,6 +9,7 @@ $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['backendShort
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['processedFilesChecksum'] = \TYPO3\CMS\Install\Updates\ProcessedFileChecksumUpdate::class;
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['filesReplacePermission'] = \TYPO3\CMS\Install\Updates\FilesReplacePermissionUpdate::class;
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['tableCType'] = \TYPO3\CMS\Install\Updates\TableFlexFormToTtContentFieldsUpdate::class;
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'][\TYPO3\CMS\Install\Updates\FileListIsStartModuleUpdate::class] = \TYPO3\CMS\Install\Updates\FileListIsStartModuleUpdate::class;
 
 $signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class);
 $signalSlotDispatcher->connect(