[TASK][WIP] Move non class code back to source files
[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 Tx_Extbase_Utility_Extension::registerModule($_EXTKEY, 'web', 'workspaces', 'before:info', array(
9 // An array holding the controller-action-combinations that are accessible
10 'Review' => 'index,fullIndex,singleIndex',
11 'Preview' => 'index,newPage'
12 ), array(
13 'access' => 'user,group',
14 'icon' => 'EXT:workspaces/Resources/Public/Images/moduleicon.gif',
15 'labels' => ('LLL:EXT:' . $_EXTKEY) . '/Resources/Private/Language/locallang_mod.xml',
16 'navigationComponentId' => 'typo3-pagetree'
17 ));
18 // register ExtDirect
19 t3lib_extMgm::registerExtDirectComponent('TYPO3.Workspaces.ExtDirect', t3lib_extMgm::extPath($_EXTKEY) . 'Classes/ExtDirect/Server.php:Tx_Workspaces_ExtDirect_Server', 'web_WorkspacesWorkspaces', 'user,group');
20 t3lib_extMgm::registerExtDirectComponent('TYPO3.Workspaces.ExtDirectActions', t3lib_extMgm::extPath($_EXTKEY) . 'Classes/ExtDirect/ActionHandler.php:Tx_Workspaces_ExtDirect_ActionHandler', 'web_WorkspacesWorkspaces', 'user,group');
21 t3lib_extMgm::registerExtDirectComponent('TYPO3.Workspaces.ExtDirectMassActions', t3lib_extMgm::extPath($_EXTKEY) . 'Classes/ExtDirect/MassActionHandler.php:Tx_Workspaces_ExtDirect_MassActionHandler', 'web_WorkspacesWorkspaces', 'user,group');
22 t3lib_extMgm::registerExtDirectComponent('TYPO3.Ajax.ExtDirect.ToolbarMenu', t3lib_extMgm::extPath($_EXTKEY) . 'Classes/ExtDirect/ToolbarMenu.php:Tx_Workspaces_ExtDirect_ToolbarMenu');
23 }
24 /**
25 * Table "sys_workspace":
26 */
27 $TCA['sys_workspace'] = array(
28 'ctrl' => array(
29 'label' => 'title',
30 'tstamp' => 'tstamp',
31 'title' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace',
32 'adminOnly' => 1,
33 'rootLevel' => 1,
34 'delete' => 'deleted',
35 'iconfile' => 'sys_workspace.png',
36 'typeicon_classes' => array(
37 'default' => 'mimetypes-x-sys_workspace'
38 ),
39 'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY) . 'tca.php',
40 'versioningWS_alwaysAllowLiveEdit' => TRUE,
41 'dividers2tabs' => TRUE
42 )
43 );
44 /**
45 * Table "sys_workspace_stage":
46 * Defines single custom stages which are related to sys_workspace table to create complex working processes
47 * This is only the 'header' part (ctrl). The full configuration is found in t3lib/stddb/tbl_be.php
48 */
49 $TCA['sys_workspace_stage'] = array(
50 'ctrl' => array(
51 'label' => 'title',
52 'tstamp' => 'tstamp',
53 'sortby' => 'sorting',
54 'title' => 'LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xml:sys_workspace_stage',
55 'adminOnly' => 1,
56 'rootLevel' => 1,
57 'hideTable' => TRUE,
58 'delete' => 'deleted',
59 'iconfile' => 'sys_workspace.png',
60 'typeicon_classes' => array(
61 'default' => 'mimetypes-x-sys_workspace'
62 ),
63 'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY) . 'tca.php',
64 'versioningWS_alwaysAllowLiveEdit' => TRUE,
65 'dividers2tabs' => TRUE
66 )
67 );
68 // todo move icons to Core sprite or keep them here and remove the todo note ;)
69 $icons = array(
70 'sendtonextstage' => t3lib_extMgm::extRelPath($_EXTKEY) . 'Resources/Public/Images/version-workspace-sendtonextstage.png',
71 'sendtoprevstage' => t3lib_extMgm::extRelPath($_EXTKEY) . 'Resources/Public/Images/version-workspace-sendtoprevstage.png',
72 'generatepreviewlink' => t3lib_extMgm::extRelPath($_EXTKEY) . 'Resources/Public/Images/generate-ws-preview-link.png'
73 );
74 t3lib_SpriteManager::addSingleIcons($icons, $_EXTKEY);
75 t3lib_extMgm::addLLrefForTCAdescr('sys_workspace_stage', 'EXT:workspaces/Resources/Private/Language/locallang_csh_sysws_stage.xml');
76 ?>