TYPO3 API  SVNRelease
tca.php
Go to the documentation of this file.
00001 <?php
00002 /**
00003  * System workspaces - Defines the offline workspaces available to users in TYPO3.
00004  */
00005 $TCA['sys_workspace'] = array(
00006     'ctrl' => $TCA['sys_workspace']['ctrl'],
00007     'columns' => array(
00008         'title' => array(
00009             'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.title',
00010             'config' => array(
00011                 'type' => 'input',
00012                 'size' => '20',
00013                 'max' => '30',
00014                 'eval' => 'required,trim,unique'
00015             )
00016         ),
00017         'description' => array(
00018             'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.description',
00019             'config' => array(
00020                 'type' => 'text',
00021                 'rows' => 5,
00022                 'cols' => 30
00023             )
00024         ),
00025         'adminusers' => array(
00026             'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.adminusers',
00027             'config' => array(
00028                 'type' => 'group',
00029                 'internal_type' => 'db',
00030                 'allowed' => 'be_users,be_groups',
00031                 'prepend_tname' => 1,
00032                 'size' => '3',
00033                 'maxitems' => '10',
00034                 'autoSizeMax' => 10,
00035                 'show_thumbs' => '1',
00036                 'wizards' => array(
00037                     'suggest' => array(
00038                         'type' => 'suggest',
00039                     )
00040                 )
00041             )
00042         ),
00043         'members' => array(
00044             'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.members',
00045             'config' => array(
00046                 'type' => 'group',
00047                 'internal_type' => 'db',
00048                 'allowed' => 'be_users,be_groups',
00049                 'prepend_tname' => 1,
00050                 'size' => '3',
00051                 'maxitems' => '100',
00052                 'autoSizeMax' => 10,
00053                 'show_thumbs' => '1',
00054                 'wizards' => array(
00055                     'suggest' => array(
00056                         'type' => 'suggest',
00057                     )
00058                 )
00059             )
00060         ),
00061         'db_mountpoints' => array(
00062             'label' => 'LLL:EXT:lang/locallang_tca.xml:db_mountpoints',
00063             'config' => array(
00064                 'type' => 'group',
00065                 'internal_type' => 'db',
00066                     'allowed' => 'pages',
00067                 'size' => '3',
00068                 'maxitems' => '10',
00069                 'autoSizeMax' => 10,
00070                 'show_thumbs' => '1',
00071                 'wizards' => array(
00072                     'suggest' => array(
00073                         'type' => 'suggest',
00074                     )
00075                 )
00076             )
00077         ),
00078         'file_mountpoints' => array(
00079             'label' => 'LLL:EXT:lang/locallang_tca.xml:file_mountpoints',
00080             'config' => array(
00081                 'type' => 'select',
00082                 'foreign_table' => 'sys_filemounts',
00083                 'foreign_table_where' => ' AND sys_filemounts.pid=0 ORDER BY sys_filemounts.title',
00084                 'size' => '3',
00085                 'maxitems' => '10',
00086                 'autoSizeMax' => 10,
00087                 'renderMode' => $GLOBALS['TYPO3_CONF_VARS']['BE']['accessListRenderMode'],
00088                 'iconsInOptionTags' => 1,
00089             )
00090         ),
00091         'publish_time' => array(
00092             'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.publish_time',
00093             'config' => array(
00094                 'type' => 'input',
00095                 'size' => '8',
00096                 'max' => '20',
00097                 'eval' => 'datetime',
00098                 'default' => '0',
00099                 'checkbox' => '0'
00100             )
00101         ),
00102         'unpublish_time' => array(
00103             'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.unpublish_time',
00104             'config' => array(
00105                 'type' => 'input',
00106                 'size' => '8',
00107                 'max' => '20',
00108                 'eval' => 'datetime',
00109                 'checkbox' => '0',
00110                 'default' => '0',
00111                 'range' => array(
00112                     'upper' => mktime(0,0,0,12,31,2020),
00113                 )
00114             ),
00115             'displayCond' => 'FALSE'            // this feature doesn't work yet therefore it's not shown by default
00116         ),
00117         'freeze' => array(
00118             'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.freeze',
00119             'config' => array(
00120                 'type' => 'check',
00121                 'default' => '0'
00122             )
00123         ),
00124         'live_edit' => array(
00125             'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.live_edit',
00126             'config' => array(
00127                 'type' => 'check',
00128                 'default' => '0'
00129             )
00130         ),
00131         'disable_autocreate' => array(
00132             'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.disable_autocreate',
00133             'config' => array(
00134                 'type' => 'check',
00135                 'default' => '0'
00136             )
00137         ),
00138         'swap_modes' => array(
00139             'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.swap_modes',
00140             'config' => array(
00141                 'type' => 'select',
00142                 'items' => array(
00143                     array('', 0),
00144                     array('Swap-Into-Workspace on Auto-publish', 1),
00145                     array('Disable Swap-Into-Workspace', 2)
00146                 ),
00147             )
00148         ),
00149         'publish_access' => array(
00150             'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.publish_access',
00151             'config' => array(
00152                 'type' => 'check',
00153                 'items' => array(
00154                     array('Publish only content in publish stage', 0),
00155                     array('Only workspace owner can publish', 0),
00156                 ),
00157             )
00158         ),
00159         'stagechg_notification' => array(
00160             'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.stagechg_notification',
00161             'config' => array(
00162                 'type' => 'select',
00163                 'items' => array(
00164                     array('', 0),
00165                     array('Notify users on next stage only', 1),
00166                     array('Notify all users on any change', 10)
00167                 ),
00168             )
00169         ),
00170         'custom_stages' => Array (
00171             'exclude' => 1,
00172             'label' => 'LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xml:sys_workspace.custom_stages',
00173             'config' => Array (
00174                 'type' => 'inline',
00175                 'foreign_table' => 'sys_workspace_stage',
00176                 'appearance' => 'useSortable,expandSingle',
00177                 'foreign_field' => 'parentid',
00178                 'foreign_table_field' => 'parenttable',
00179                 'minitems' => 0,
00180                 ),
00181                 'default' => 0
00182         ),
00183     ),
00184     'types' => array(
00185         '0' => array('showitem' => 'title,description,
00186             --div--;LLL:EXT:lang/locallang_tca.xml:sys_filemounts.tabs.users,adminusers,members,stagechg_notification,
00187             --div--;LLL:EXT:lang/locallang_tca.xml:sys_filemounts.tabs.mountpoints,db_mountpoints,file_mountpoints,
00188             --div--;LLL:EXT:lang/locallang_tca.xml:sys_filemounts.tabs.publishing,publish_time,unpublish_time,
00189             --div--;LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xml:sys_filemounts.tabs.staging,custom_stages,
00190             --div--;LLL:EXT:lang/locallang_tca.xml:sys_filemounts.tabs.other,freeze,live_edit,disable_autocreate,swap_modes,publish_access'
00191         )
00192     )
00193 );
00194 
00195 /**
00196  * Workspace stages - Defines the single workspace stages which are related to a workspace.
00197  */
00198 $TCA['sys_workspace_stage'] = array(
00199     'ctrl' => $TCA['sys_workspace_stage']['ctrl'],
00200     'columns' => array(
00201         'title' => array(
00202             'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.title',
00203             'config' => array(
00204                 'type' => 'input',
00205                 'size' => '20',
00206                 'max' => '30',
00207                 'eval' => 'required,trim'
00208             )
00209         ),
00210         'responsible_persons' => array(
00211             'label' => 'LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xml:sys_workspace_stage.responsible_persons',
00212             'config' => array(
00213                 'type' => 'group',
00214                 'internal_type' => 'db',
00215                 'allowed' => 'be_users,be_groups',
00216                 'prepend_tname' => 1,
00217                 'size' => '3',
00218                 'maxitems' => '100',
00219                 'autoSizeMax' => 20,
00220                 'show_thumbs' => '1',
00221                 'wizards' => array(
00222                     'suggest' => array(
00223                         'type' => 'suggest',
00224                     )
00225                 )
00226             )
00227         ),
00228         'default_mailcomment' => array(
00229             'label' => 'LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xml:sys_workspace_stage.default_mailcomment',
00230             'config' => array(
00231                 'type' => 'text',
00232                 'rows' => 5,
00233                 'cols' => 30
00234             )
00235         ),
00236         'parentid' => Array (
00237             'exclude' => 0,
00238             'label' => 'LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xml:sys_workspace_stage.parentid',
00239             'config' => Array (
00240                 'type' => 'passthrough',
00241             )
00242         ),
00243         'parenttable' => Array (
00244             'exclude' => 0,
00245             'label' => 'LLL:EXT:workspaces/Resources/Private/Language/locallang_db.xml:sys_workspace_stage.parenttable',
00246             'config' => Array (
00247                 'type' => 'passthrough',
00248             )
00249         ),
00250     ),
00251     'types' => array(
00252         '0' => array('showitem' => 'title,responsible_persons,default_mailcomment'
00253         )
00254     )
00255 );
00256 // if other versioning options than element versions are active,
00257 // the TCA column needs to be added as well
00258 if (isset($GLOBALS['TYPO3_CONF_VARS']['BE']['elementVersioningOnly'])
00259     && !$GLOBALS['TYPO3_CONF_VARS']['BE']['elementVersioningOnly']) {
00260     $additionalWorkspaceTcaColumn = array(
00261         'vtypes' => array(
00262             'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.vtypes',
00263             'config' => array(
00264                 'type' => 'check',
00265                 'items' => array(
00266                     array('Element', 0),
00267                     array('Page',    0),
00268                     array('Branch',  0)
00269                 )
00270             )
00271         )
00272     );
00273     t3lib_extMgm::addTCAcolumns('sys_workspace', $additionalWorkspaceTcaColumn, FALSE);
00274     t3lib_extMgm::addToAllTCAtypes('sys_workspace', 'vtypes', '', 'after:swap_modes');
00275 }
00276 
00277 
00278 ?>