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         'reviewers' => array(
00062             'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.reviewers',
00063             'config' => array(
00064                 'type' => 'group',
00065                 'internal_type' => 'db',
00066                 'allowed' => 'be_users,be_groups',
00067                 'prepend_tname' => 1,
00068                 'size' => '3',
00069                 'maxitems' => '100',
00070                 'autoSizeMax' => 10,
00071                 'show_thumbs' => '1',
00072                 'wizards' => array(
00073                     'suggest' => array(
00074                         'type' => 'suggest',
00075                     )
00076                 )
00077             )
00078         ),
00079         'db_mountpoints' => array(
00080             'label' => 'LLL:EXT:lang/locallang_tca.xml:db_mountpoints',
00081             'config' => array(
00082                 'type' => 'group',
00083                 'internal_type' => 'db',
00084                     'allowed' => 'pages',
00085                 'size' => '3',
00086                 'maxitems' => '10',
00087                 'autoSizeMax' => 10,
00088                 'show_thumbs' => '1',
00089                 'wizards' => array(
00090                     'suggest' => array(
00091                         'type' => 'suggest',
00092                     )
00093                 )
00094             )
00095         ),
00096         'file_mountpoints' => array(
00097             'label' => 'LLL:EXT:lang/locallang_tca.xml:file_mountpoints',
00098             'config' => array(
00099                 'type' => 'select',
00100                 'foreign_table' => 'sys_filemounts',
00101                 'foreign_table_where' => ' AND sys_filemounts.pid=0 ORDER BY sys_filemounts.title',
00102                 'size' => '3',
00103                 'maxitems' => '10',
00104                 'autoSizeMax' => 10,
00105                 'renderMode' => $GLOBALS['TYPO3_CONF_VARS']['BE']['accessListRenderMode'],
00106                 'iconsInOptionTags' => 1,
00107             )
00108         ),
00109         'publish_time' => array(
00110             'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.publish_time',
00111             'config' => array(
00112                 'type' => 'input',
00113                 'size' => '8',
00114                 'max' => '20',
00115                 'eval' => 'datetime',
00116                 'default' => '0',
00117                 'checkbox' => '0'
00118             )
00119         ),
00120         'unpublish_time' => array(
00121             'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.unpublish_time',
00122             'config' => array(
00123                 'type' => 'input',
00124                 'size' => '8',
00125                 'max' => '20',
00126                 'eval' => 'datetime',
00127                 'checkbox' => '0',
00128                 'default' => '0',
00129                 'range' => array(
00130                     'upper' => mktime(0,0,0,12,31,2020),
00131                 )
00132             )
00133         ),
00134         'freeze' => array(
00135             'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.freeze',
00136             'config' => array(
00137                 'type' => 'check',
00138                 'default' => '0'
00139             )
00140         ),
00141         'live_edit' => array(
00142             'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.live_edit',
00143             'config' => array(
00144                 'type' => 'check',
00145                 'default' => '0'
00146             )
00147         ),
00148         'review_stage_edit' => array(
00149             'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.review_stage_edit',
00150             'config' => array(
00151                 'type' => 'check',
00152                 'default' => '0'
00153             )
00154         ),
00155         'disable_autocreate' => array(
00156             'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.disable_autocreate',
00157             'config' => array(
00158                 'type' => 'check',
00159                 'default' => '0'
00160             )
00161         ),
00162         'swap_modes' => array(
00163             'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.swap_modes',
00164             'config' => array(
00165                 'type' => 'select',
00166                 'items' => array(
00167                     array('', 0),
00168                     array('Swap-Into-Workspace on Auto-publish', 1),
00169                     array('Disable Swap-Into-Workspace', 2)
00170                 ),
00171             )
00172         ),
00173         'publish_access' => array(
00174             'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.publish_access',
00175             'config' => array(
00176                 'type' => 'check',
00177                 'items' => array(
00178                     array('Publish only content in publish stage', 0),
00179                     array('Only workspace owner can publish', 0),
00180                 ),
00181             )
00182         ),
00183         'stagechg_notification' => array(
00184             'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.stagechg_notification',
00185             'config' => array(
00186                 'type' => 'select',
00187                 'items' => array(
00188                     array('', 0),
00189                     array('Notify users on next stage only', 1),
00190                     array('Notify all users on any change', 10)
00191                 ),
00192             )
00193         ),
00194     ),
00195     'types' => array(
00196         '0' => array('showitem' => 'title,description,
00197             --div--;LLL:EXT:lang/locallang_tca.xml:sys_filemounts.tabs.users,adminusers,members,reviewers,stagechg_notification,
00198             --div--;LLL:EXT:lang/locallang_tca.xml:sys_filemounts.tabs.mountpoints,db_mountpoints,file_mountpoints,
00199             --div--;LLL:EXT:lang/locallang_tca.xml:sys_filemounts.tabs.publishing,publish_time,unpublish_time,
00200             --div--;LLL:EXT:lang/locallang_tca.xml:sys_filemounts.tabs.other,freeze,live_edit,review_stage_edit,disable_autocreate,swap_modes,publish_access'
00201         )
00202     )
00203 );
00204 
00205 // if other versioning options than element versions are active, 
00206 // the TCA column needs to be added as well
00207 if (isset($GLOBALS['TYPO3_CONF_VARS']['BE']['elementVersioningOnly'])
00208     && !$GLOBALS['TYPO3_CONF_VARS']['BE']['elementVersioningOnly']) {
00209     $additionalWorkspaceTcaColumn = array(
00210         'vtypes' => array(
00211             'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.vtypes',
00212             'config' => array(
00213                 'type' => 'check',
00214                 'items' => array(
00215                     array('Element', 0),
00216                     array('Page',    0),
00217                     array('Branch',  0)
00218                 )
00219             )
00220         )
00221     );
00222     t3lib_extMgm::addTCAcolumns('sys_workspace', $additionalWorkspaceTcaColumn, FALSE);
00223     t3lib_extMgm::addToAllTCAtypes('sys_workspace', 'vtypes', '', 'after:swap_modes');
00224 }
00225 
00226 
00227 ?>