[!!!][TASK] Doctrine: Migrate AbstractPlugin
[Packages/TYPO3.CMS.git] / typo3 / sysext / recordlist / ext_tables.php
index 1d55bdc..1cd7e78 100644 (file)
@@ -1,10 +1,56 @@
 <?php
-if (!defined ('TYPO3_MODE')) {
-       die ('Access denied.');
-}
+defined('TYPO3_MODE') or die();
 
 if (TYPO3_MODE === 'BE') {
-       t3lib_extMgm::addModulePath('web_list', t3lib_extMgm::extPath($_EXTKEY) . 'mod1/');
-       t3lib_extMgm::addModule('web', 'list', '', t3lib_extMgm::extPath($_EXTKEY) . 'mod1/');
+    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule(
+        'web',
+        'list',
+        '',
+        '',
+        array(
+            'routeTarget' => \TYPO3\CMS\Recordlist\RecordList::class . '::mainAction',
+            'access' => 'user,group',
+            'name' => 'web_list',
+            'icon' => 'EXT:recordlist/Resources/Public/Icons/module-list.svg',
+            'labels' => 'LLL:EXT:lang/locallang_mod_web_list.xlf'
+        )
+    );
+
+    // register element browsers
+    $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ElementBrowsers']['db'] =  \TYPO3\CMS\Recordlist\Browser\DatabaseBrowser::class;
+    $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ElementBrowsers']['file'] =  \TYPO3\CMS\Recordlist\Browser\FileBrowser::class;
+    $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ElementBrowsers']['folder'] =  \TYPO3\CMS\Recordlist\Browser\FolderBrowser::class;
+
+    // register default link handlers
+    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('
+               TCEMAIN.linkHandler {
+                       page {
+                               handler = TYPO3\\CMS\\Recordlist\\LinkHandler\\PageLinkHandler
+                               label = LLL:EXT:lang/locallang_browse_links.xlf:page
+                       }
+                       file {
+                               handler = TYPO3\\CMS\\Recordlist\\LinkHandler\\FileLinkHandler
+                               label = LLL:EXT:lang/locallang_browse_links.xlf:file
+                               displayAfter = page
+                               scanAfter = page
+                       }
+                       folder {
+                               handler = TYPO3\\CMS\\Recordlist\\LinkHandler\\FolderLinkHandler
+                               label = LLL:EXT:lang/locallang_browse_links.xlf:folder
+                               displayAfter = file
+                               scanAfter = file
+                       }
+                       url {
+                               handler = TYPO3\\CMS\\Recordlist\\LinkHandler\\UrlLinkHandler
+                               label = LLL:EXT:lang/locallang_browse_links.xlf:extUrl
+                               displayAfter = folder
+                               scanAfter = mail
+                       }
+                       mail {
+                               handler = TYPO3\\CMS\\Recordlist\\LinkHandler\\MailLinkHandler
+                               label = LLL:EXT:lang/locallang_browse_links.xlf:email
+                               displayAfter = url
+                       }
+               }
+       ');
 }
-?>
\ No newline at end of file