[BUGFIX] Properly register extbase BE modules
[Packages/TYPO3.CMS.git] / typo3 / sysext / workspaces / ext_tables.php
1 <?php
2 if (!defined('TYPO3_MODE')) {
3 die('Access denied.');
4 }
5 // avoid that this block is loaded in the frontend or within the upgrade-wizards
6 if (TYPO3_MODE == 'BE' && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_INSTALL)) {
7 /** Registers a Backend Module */
8 \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
9 'TYPO3.CMS.' . $_EXTKEY,
10 'web',
11 'workspaces',
12 'before:info',
13 array(
14 // An array holding the controller-action-combinations that are accessible
15 'Review' => 'index,fullIndex,singleIndex',
16 'Preview' => 'index,newPage'
17 ),
18 array(
19 'access' => 'user,group',
20 'icon' => 'EXT:workspaces/Resources/Public/Images/moduleicon.gif',
21 'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_mod.xml',
22 'navigationComponentId' => 'typo3-pagetree'
23 )
24 );
25 // register ExtDirect
26 \TYPO3\CMS\Core\Extension\ExtensionManager::registerExtDirectComponent('TYPO3.Workspaces.ExtDirect', \TYPO3\CMS\Core\Extension\ExtensionManager::extPath($_EXTKEY) . 'Classes/ExtDirect/Server.php:TYPO3\\CMS\\Workspaces\\ExtDirect\\ExtDirectServer', 'web_WorkspacesWorkspaces', 'user,group');
27 \TYPO3\CMS\Core\Extension\ExtensionManager::registerExtDirectComponent('TYPO3.Workspaces.ExtDirectActions', \TYPO3\CMS\Core\Extension\ExtensionManager::extPath($_EXTKEY) . 'Classes/ExtDirect/ActionHandler.php:TYPO3\\CMS\\Workspaces\\ExtDirect\\ActionHandler', 'web_WorkspacesWorkspaces', 'user,group');
28 \TYPO3\CMS\Core\Extension\ExtensionManager::registerExtDirectComponent('TYPO3.Workspaces.ExtDirectMassActions', \TYPO3\CMS\Core\Extension\ExtensionManager::extPath($_EXTKEY) . 'Classes/ExtDirect/MassActionHandler.php:TYPO3\\CMS\\Workspaces\\ExtDirect\\MassActionHandler', 'web_WorkspacesWorkspaces', 'user,group');
29 \TYPO3\CMS\Core\Extension\ExtensionManager::registerExtDirectComponent('TYPO3.Ajax.ExtDirect.ToolbarMenu', \TYPO3\CMS\Core\Extension\ExtensionManager::extPath($_EXTKEY) . 'Classes/ExtDirect/ToolbarMenu.php:TYPO3\\CMS\\Workspaces\\ExtDirect\\ToolbarMenu');
30 }
31 /**
32 * Table "sys_workspace":
33 */
34 $TCA['sys_workspace'] = array(
35 'ctrl' => array(
36 'label' => 'title',
37 'tstamp' => 'tstamp',
38 'title' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace',
39 'adminOnly' => 1,
40 'rootLevel' => 1,
41 'delete' => 'deleted',
42 'iconfile' => 'sys_workspace.png',
43 'typeicon_classes' => array(
44 'default' => 'mimetypes-x-sys_workspace'
45 ),
46 'dynamicConfigFile' => \TYPO3\CMS\Core\Extension\ExtensionManager::extPath($_EXTKEY) . 'tca.php',
47 'versioningWS_alwaysAllowLiveEdit' => TRUE,
48 'dividers2tabs' => TRUE
49 )
50 );
51 /**
52 * Table "sys_workspace_stage":
53 * Defines single custom stages which are related to sys_workspace table to create complex working processes
54 * This is only the 'header' part (ctrl). The full configuration is found in t3lib/stddb/tbl_be.php
55 */
56 $TCA['sys_workspace_stage'] = array(
57 'ctrl' => array(
58 'label' => 'title',
59 'tstamp' => 'tstamp',
60 'sortby' => 'sorting',
61 'title' => 'LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xml:sys_workspace_stage',
62 'adminOnly' => 1,
63 'rootLevel' => 1,
64 'hideTable' => TRUE,
65 'delete' => 'deleted',
66 'iconfile' => 'sys_workspace.png',
67 'typeicon_classes' => array(
68 'default' => 'mimetypes-x-sys_workspace'
69 ),
70 'dynamicConfigFile' => \TYPO3\CMS\Core\Extension\ExtensionManager::extPath($_EXTKEY) . 'tca.php',
71 'versioningWS_alwaysAllowLiveEdit' => TRUE,
72 'dividers2tabs' => TRUE
73 )
74 );
75 // todo move icons to Core sprite or keep them here and remove the todo note ;)
76 $icons = array(
77 'sendtonextstage' => \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath($_EXTKEY) . 'Resources/Public/Images/version-workspace-sendtonextstage.png',
78 'sendtoprevstage' => \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath($_EXTKEY) . 'Resources/Public/Images/version-workspace-sendtoprevstage.png',
79 'generatepreviewlink' => \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath($_EXTKEY) . 'Resources/Public/Images/generate-ws-preview-link.png'
80 );
81 \TYPO3\CMS\Backend\Sprite\SpriteManager::addSingleIcons($icons, $_EXTKEY);
82 \TYPO3\CMS\Core\Extension\ExtensionManager::addLLrefForTCAdescr('sys_workspace_stage', 'EXT:workspaces/Resources/Private/Language/locallang_csh_sysws_stage.xml');
83 ?>