[TASK] Remove namespace and name of AMD modules
[Packages/TYPO3.CMS.git] / typo3 / sysext / taskcenter / ext_tables.php
index 461a11f..b7f2f81 100644 (file)
@@ -1,18 +1,22 @@
 <?php
-if (!defined('TYPO3_MODE')) {
-       die('Access denied.');
-}
+defined('TYPO3_MODE') or die();
+
 if (TYPO3_MODE === 'BE') {
-       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath(
-               'tools_txtaskcenterM1',
-               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'task/'
-       );
-       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule(
-               'user',
-               'task',
-               'top',
-               \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'task/'
-       );
-       $GLOBALS['TYPO3_CONF_VARS']['BE']['AJAX']['Taskcenter::saveCollapseState'] = 'EXT:taskcenter/Classes/TaskStatus.php:TYPO3\\CMS\\Taskcenter\\TaskStatus->saveCollapseState';
-       $GLOBALS['TYPO3_CONF_VARS']['BE']['AJAX']['Taskcenter::saveSortingState'] = 'EXT:taskcenter/Classes/TaskStatus.php:TYPO3\\CMS\\Taskcenter\\TaskStatus->saveSortingState';
+    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule(
+        'user',
+        'task',
+        'top',
+        '',
+        array(
+            'routeTarget' => \TYPO3\CMS\Taskcenter\Controller\TaskModuleController::class . '::mainAction',
+            'access' => 'group,user',
+            'name' => 'user_task',
+            'labels' => array(
+                'tabs_images' => array(
+                    'tab' => 'EXT:taskcenter/Resources/Public/Icons/module-taskcenter.svg',
+                ),
+                'll_ref' => 'LLL:EXT:taskcenter/Resources/Private/Language/locallang_mod.xlf',
+            ),
+        )
+    );
 }