[BUGFIX] Ext Direct API lacks the possibility of adding access control
[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 /**
8 * Registers a Backend Module
9 */
10 Tx_Extbase_Utility_Extension::registerModule(
11 $_EXTKEY,
12 'web', // Make module a submodule of 'web'
13 'workspaces', // Submodule key
14 'before:info', // Position
15 array(
16 // An array holding the controller-action-combinations that are accessible
17 'Review' => 'index,fullIndex,singleIndex',
18 'Preview' => 'index,newPage'
19 ),
20 array(
21 'access' => 'user,group',
22 'icon' => 'EXT:workspaces/Resources/Public/Images/moduleicon.gif',
23 'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_mod.xml',
24 'navigationComponentId' => 'typo3-pagetree',
25 )
26 );
27
28 // register ExtDirect
29 t3lib_extMgm::registerExtDirectComponent(
30 'TYPO3.Workspaces.ExtDirect',
31 t3lib_extMgm::extPath($_EXTKEY) . 'Classes/ExtDirect/Server.php:tx_Workspaces_ExtDirect_Server',
32 'web_WorkspacesWorkspaces',
33 'user,group'
34 );
35
36 t3lib_extMgm::registerExtDirectComponent(
37 'TYPO3.Workspaces.ExtDirectActions',
38 t3lib_extMgm::extPath($_EXTKEY) . 'Classes/ExtDirect/ActionHandler.php:tx_Workspaces_ExtDirect_ActionHandler',
39 'web_WorkspacesWorkspaces',
40 'user,group'
41 );
42
43 t3lib_extMgm::registerExtDirectComponent(
44 'TYPO3.Workspaces.ExtDirectMassActions',
45 t3lib_extMgm::extPath($_EXTKEY) . 'Classes/ExtDirect/MassActionHandler.php:tx_Workspaces_ExtDirect_MassActionHandler',
46 'web_WorkspacesWorkspaces',
47 'user,group'
48 );
49
50 t3lib_extMgm::registerExtDirectComponent(
51 'TYPO3.Ajax.ExtDirect.ToolbarMenu',
52 t3lib_extMgm::extPath($_EXTKEY) . 'Classes/ExtDirect/ToolbarMenu.php:tx_Workspaces_ExtDirect_ToolbarMenu'
53 );
54
55 // register the reports statusprovider
56 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['configuration'][] = 'Tx_Workspaces_Reports_StatusProvider';
57
58
59 }
60
61 /**
62 * Table "sys_workspace":
63 */
64 $TCA['sys_workspace'] = array(
65 'ctrl' => array(
66 'label' => 'title',
67 'tstamp' => 'tstamp',
68 'title' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace',
69 'adminOnly' => 1,
70 'rootLevel' => 1,
71 'delete' => 'deleted',
72 'iconfile' => 'sys_workspace.png',
73 'typeicon_classes' => array(
74 'default' => 'mimetypes-x-sys_workspace'
75 ),
76 'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY) . 'tca.php',
77 'versioningWS_alwaysAllowLiveEdit' => TRUE,
78 'dividers2tabs' => TRUE
79 )
80 );
81
82 /**
83 * Table "sys_workspace_stage":
84 * Defines single custom stages which are related to sys_workspace table to create complex working processes
85 * This is only the 'header' part (ctrl). The full configuration is found in t3lib/stddb/tbl_be.php
86 */
87 $TCA['sys_workspace_stage'] = array(
88 'ctrl' => array(
89 'label' => 'title',
90 'tstamp' => 'tstamp',
91 'sortby' => 'sorting',
92 'title' => 'LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xml:sys_workspace_stage',
93 'adminOnly' => 1,
94 'rootLevel' => 1,
95 'hideTable' => TRUE,
96 'delete' => 'deleted',
97 'iconfile' => 'sys_workspace.png',
98 'typeicon_classes' => array(
99 'default' => 'mimetypes-x-sys_workspace'
100 ),
101 'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY) . 'tca.php',
102 'versioningWS_alwaysAllowLiveEdit' => TRUE,
103 'dividers2tabs' => TRUE
104 )
105 );
106 // todo move icons to Core sprite or keep them here and remove the todo note ;)
107 $icons = array(
108 'sendtonextstage' => t3lib_extMgm::extRelPath($_EXTKEY) . 'Resources/Public/Images/version-workspace-sendtonextstage.png',
109 'sendtoprevstage' => t3lib_extMgm::extRelPath($_EXTKEY) . 'Resources/Public/Images/version-workspace-sendtoprevstage.png',
110 'generatepreviewlink' => t3lib_extMgm::extRelPath($_EXTKEY) . 'Resources/Public/Images/generate-ws-preview-link.png',
111 );
112 t3lib_SpriteManager::addSingleIcons($icons, $_EXTKEY);
113 t3lib_extMgm::addLLrefForTCAdescr('sys_workspace_stage','EXT:workspaces/Resources/Private/Language/locallang_csh_sysws_stage.xml');
114
115
116 ?>