PageRenderTime 71ms CodeModel.GetById 45ms RepoModel.GetById 1ms app.codeStats 0ms

/typo3/sysext/version/tca.php

https://github.com/MCDarkMaster/TYPO3v4-Core
PHP | 227 lines | 219 code | 3 blank | 5 comment | 2 complexity | 15faabdcfdf43bd1aef95f686256b62a MD5 | raw file
  1. <?php
  2. /**
  3. * System workspaces - Defines the offline workspaces available to users in TYPO3.
  4. */
  5. $TCA['sys_workspace'] = array(
  6. 'ctrl' => $TCA['sys_workspace']['ctrl'],
  7. 'columns' => array(
  8. 'title' => array(
  9. 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.title',
  10. 'config' => array(
  11. 'type' => 'input',
  12. 'size' => '20',
  13. 'max' => '30',
  14. 'eval' => 'required,trim,unique'
  15. )
  16. ),
  17. 'description' => array(
  18. 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.description',
  19. 'config' => array(
  20. 'type' => 'text',
  21. 'rows' => 5,
  22. 'cols' => 30
  23. )
  24. ),
  25. 'adminusers' => array(
  26. 'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.adminusers',
  27. 'config' => array(
  28. 'type' => 'group',
  29. 'internal_type' => 'db',
  30. 'allowed' => 'be_users,be_groups',
  31. 'prepend_tname' => 1,
  32. 'size' => '3',
  33. 'maxitems' => '10',
  34. 'autoSizeMax' => 10,
  35. 'show_thumbs' => '1',
  36. 'wizards' => array(
  37. 'suggest' => array(
  38. 'type' => 'suggest',
  39. )
  40. )
  41. )
  42. ),
  43. 'members' => array(
  44. 'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.members',
  45. 'config' => array(
  46. 'type' => 'group',
  47. 'internal_type' => 'db',
  48. 'allowed' => 'be_users,be_groups',
  49. 'prepend_tname' => 1,
  50. 'size' => '3',
  51. 'maxitems' => '100',
  52. 'autoSizeMax' => 10,
  53. 'show_thumbs' => '1',
  54. 'wizards' => array(
  55. 'suggest' => array(
  56. 'type' => 'suggest',
  57. )
  58. )
  59. )
  60. ),
  61. 'reviewers' => array(
  62. 'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.reviewers',
  63. 'config' => array(
  64. 'type' => 'group',
  65. 'internal_type' => 'db',
  66. 'allowed' => 'be_users,be_groups',
  67. 'prepend_tname' => 1,
  68. 'size' => '3',
  69. 'maxitems' => '100',
  70. 'autoSizeMax' => 10,
  71. 'show_thumbs' => '1',
  72. 'wizards' => array(
  73. 'suggest' => array(
  74. 'type' => 'suggest',
  75. )
  76. )
  77. )
  78. ),
  79. 'db_mountpoints' => array(
  80. 'label' => 'LLL:EXT:lang/locallang_tca.xml:db_mountpoints',
  81. 'config' => array(
  82. 'type' => 'group',
  83. 'internal_type' => 'db',
  84. 'allowed' => 'pages',
  85. 'size' => '3',
  86. 'maxitems' => '10',
  87. 'autoSizeMax' => 10,
  88. 'show_thumbs' => '1',
  89. 'wizards' => array(
  90. 'suggest' => array(
  91. 'type' => 'suggest',
  92. )
  93. )
  94. )
  95. ),
  96. 'file_mountpoints' => array(
  97. 'label' => 'LLL:EXT:lang/locallang_tca.xml:file_mountpoints',
  98. 'config' => array(
  99. 'type' => 'select',
  100. 'foreign_table' => 'sys_filemounts',
  101. 'foreign_table_where' => ' AND sys_filemounts.pid=0 ORDER BY sys_filemounts.title',
  102. 'size' => '3',
  103. 'maxitems' => '10',
  104. 'autoSizeMax' => 10,
  105. 'renderMode' => $GLOBALS['TYPO3_CONF_VARS']['BE']['accessListRenderMode'],
  106. 'iconsInOptionTags' => 1,
  107. )
  108. ),
  109. 'publish_time' => array(
  110. 'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.publish_time',
  111. 'config' => array(
  112. 'type' => 'input',
  113. 'size' => '8',
  114. 'max' => '20',
  115. 'eval' => 'datetime',
  116. 'default' => '0',
  117. 'checkbox' => '0'
  118. )
  119. ),
  120. 'unpublish_time' => array(
  121. 'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.unpublish_time',
  122. 'config' => array(
  123. 'type' => 'input',
  124. 'size' => '8',
  125. 'max' => '20',
  126. 'eval' => 'datetime',
  127. 'checkbox' => '0',
  128. 'default' => '0',
  129. 'range' => array(
  130. 'upper' => mktime(0,0,0,12,31,2020),
  131. )
  132. )
  133. ),
  134. 'freeze' => array(
  135. 'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.freeze',
  136. 'config' => array(
  137. 'type' => 'check',
  138. 'default' => '0'
  139. )
  140. ),
  141. 'live_edit' => array(
  142. 'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.live_edit',
  143. 'config' => array(
  144. 'type' => 'check',
  145. 'default' => '0'
  146. )
  147. ),
  148. 'review_stage_edit' => array(
  149. 'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.review_stage_edit',
  150. 'config' => array(
  151. 'type' => 'check',
  152. 'default' => '0'
  153. )
  154. ),
  155. 'disable_autocreate' => array(
  156. 'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.disable_autocreate',
  157. 'config' => array(
  158. 'type' => 'check',
  159. 'default' => '0'
  160. )
  161. ),
  162. 'swap_modes' => array(
  163. 'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.swap_modes',
  164. 'config' => array(
  165. 'type' => 'select',
  166. 'items' => array(
  167. array('', 0),
  168. array('Swap-Into-Workspace on Auto-publish', 1),
  169. array('Disable Swap-Into-Workspace', 2)
  170. ),
  171. )
  172. ),
  173. 'publish_access' => array(
  174. 'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.publish_access',
  175. 'config' => array(
  176. 'type' => 'check',
  177. 'items' => array(
  178. array('Publish only content in publish stage', 0),
  179. array('Only workspace owner can publish', 0),
  180. ),
  181. )
  182. ),
  183. 'stagechg_notification' => array(
  184. 'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.stagechg_notification',
  185. 'config' => array(
  186. 'type' => 'select',
  187. 'items' => array(
  188. array('', 0),
  189. array('Notify users on next stage only', 1),
  190. array('Notify all users on any change', 10)
  191. ),
  192. )
  193. ),
  194. ),
  195. 'types' => array(
  196. '0' => array('showitem' => 'title,description,
  197. --div--;LLL:EXT:lang/locallang_tca.xml:sys_filemounts.tabs.users,adminusers,members,reviewers,stagechg_notification,
  198. --div--;LLL:EXT:lang/locallang_tca.xml:sys_filemounts.tabs.mountpoints,db_mountpoints,file_mountpoints,
  199. --div--;LLL:EXT:lang/locallang_tca.xml:sys_filemounts.tabs.publishing,publish_time,unpublish_time,
  200. --div--;LLL:EXT:lang/locallang_tca.xml:sys_filemounts.tabs.other,freeze,live_edit,review_stage_edit,disable_autocreate,swap_modes,publish_access'
  201. )
  202. )
  203. );
  204. // if other versioning options than element versions are active,
  205. // the TCA column needs to be added as well
  206. if (isset($GLOBALS['TYPO3_CONF_VARS']['BE']['elementVersioningOnly'])
  207. && !$GLOBALS['TYPO3_CONF_VARS']['BE']['elementVersioningOnly']) {
  208. $additionalWorkspaceTcaColumn = array(
  209. 'vtypes' => array(
  210. 'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.vtypes',
  211. 'config' => array(
  212. 'type' => 'check',
  213. 'items' => array(
  214. array('Element', 0),
  215. array('Page', 0),
  216. array('Branch', 0)
  217. )
  218. )
  219. )
  220. );
  221. t3lib_extMgm::addTCAcolumns('sys_workspace', $additionalWorkspaceTcaColumn, FALSE);
  222. t3lib_extMgm::addToAllTCAtypes('sys_workspace', 'vtypes', '', 'after:swap_modes');
  223. }
  224. ?>