[TASK] Use name-resolution instead of strings where possible: 13
[Packages/TYPO3.CMS.git] / typo3 / sysext / taskcenter / ext_tables.php
old mode 100755 (executable)
new mode 100644 (file)
index 2f2ee1d..b94f38b
@@ -1,11 +1,25 @@
 <?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/'
+       );
+
+       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerAjaxHandler(
+               'Taskcenter::saveCollapseState',
+               \TYPO3\CMS\Taskcenter\TaskStatus::class . '->saveCollapseState'
+       );
+
+       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerAjaxHandler(
+               'Taskcenter::saveSortingState',
+               \TYPO3\CMS\Taskcenter\TaskStatus::class . '->saveSortingState'
+       );
 }
-if (TYPO3_MODE == 'BE') {
-       \TYPO3\CMS\Core\Extension\ExtensionManager::addModulePath('tools_txtaskcenterM1', \TYPO3\CMS\Core\Extension\ExtensionManager::extPath($_EXTKEY) . 'task/');
-       \TYPO3\CMS\Core\Extension\ExtensionManager::addModule('user', 'task', 'top', \TYPO3\CMS\Core\Extension\ExtensionManager::extPath($_EXTKEY) . 'task/');
-       $GLOBALS['TYPO3_CONF_VARS']['BE']['AJAX']['Taskcenter::saveCollapseState'] = 'EXT:taskcenter/Classes/class.tx_taskcenter_status.php:TYPO3\\CMS\\Taskcenter\\TaskStatus->saveCollapseState';
-       $GLOBALS['TYPO3_CONF_VARS']['BE']['AJAX']['Taskcenter::saveSortingState'] = 'EXT:taskcenter/Classes/class.tx_taskcenter_status.php:TYPO3\\CMS\\Taskcenter\\TaskStatus->saveSortingState';
-}
-?>
\ No newline at end of file