/tca.php

https://github.com/ingmars/FAL-Table-Structure-Extension · PHP · 482 lines · 473 code · 9 blank · 0 comment · 1 complexity · b21c226c8383e43195d0f9aed8893d7c MD5 · raw file

  1. <?php
  2. if (!defined('TYPO3_MODE')) {
  3. die ('Access denied.');
  4. }
  5. $TCA['sys_file_mountpoints'] = array (
  6. 'ctrl' => $TCA['sys_file_mountpoints']['ctrl'],
  7. 'interface' => array (
  8. 'showRecordFieldList' => 'hidden,name,description,driver,driver_configuration'
  9. ),
  10. 'feInterface' => $TCA['sys_file_mountpoints']['feInterface'],
  11. 'columns' => array (
  12. 'hidden' => array (
  13. 'exclude' => 1,
  14. 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden',
  15. 'config' => array (
  16. 'type' => 'check',
  17. 'default' => '0'
  18. )
  19. ),
  20. 'name' => array (
  21. 'exclude' => 0,
  22. 'label' => 'LLL:EXT:file/locallang_db.xml:sys_file_mountpoints.name',
  23. 'config' => array (
  24. 'type' => 'input',
  25. 'size' => '30',
  26. )
  27. ),
  28. 'description' => array (
  29. 'exclude' => 0,
  30. 'label' => 'LLL:EXT:file/locallang_db.xml:sys_file_mountpoints.description',
  31. 'config' => array (
  32. 'type' => 'text',
  33. 'cols' => '30',
  34. 'rows' => '5',
  35. )
  36. ),
  37. 'driver' => array (
  38. 'exclude' => 0,
  39. 'label' => 'LLL:EXT:file/locallang_db.xml:sys_file_mountpoints.driver',
  40. 'config' => array (
  41. 'type' => 'input',
  42. 'size' => '30',
  43. )
  44. ),
  45. 'driver_configuration' => array (
  46. 'exclude' => 0,
  47. 'label' => 'LLL:EXT:file/locallang_db.xml:sys_file_mountpoints.driver_configuration',
  48. 'config' => array (
  49. 'type' => 'text',
  50. 'cols' => '30',
  51. 'rows' => '5',
  52. )
  53. ),
  54. ),
  55. 'types' => array (
  56. '0' => array('showitem' => 'hidden;;1;;1-1-1, name, description, driver, driver_configuration')
  57. ),
  58. 'palettes' => array (
  59. '1' => array('showitem' => '')
  60. )
  61. );
  62. $TCA['sys_file'] = array (
  63. 'ctrl' => $TCA['sys_file']['ctrl'],
  64. 'interface' => array (
  65. 'showRecordFieldList' => 'sys_language_uid,l10n_parent,l10n_diffsource,hidden,starttime,endtime,fe_group,mount,fieldname,name,sha1,size'
  66. ),
  67. 'feInterface' => $TCA['sys_file']['feInterface'],
  68. 'columns' => array (
  69. 't3ver_label' => array (
  70. 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.versionLabel',
  71. 'config' => array (
  72. 'type' => 'input',
  73. 'size' => '30',
  74. 'max' => '30',
  75. )
  76. ),
  77. 'sys_language_uid' => array (
  78. 'exclude' => 1,
  79. 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.language',
  80. 'config' => array (
  81. 'type' => 'select',
  82. 'foreign_table' => 'sys_language',
  83. 'foreign_table_where' => 'ORDER BY sys_language.title',
  84. 'items' => array(
  85. array('LLL:EXT:lang/locallang_general.xml:LGL.allLanguages', -1),
  86. array('LLL:EXT:lang/locallang_general.xml:LGL.default_value', 0)
  87. )
  88. )
  89. ),
  90. 'l10n_parent' => array (
  91. 'displayCond' => 'FIELD:sys_language_uid:>:0',
  92. 'exclude' => 1,
  93. 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.l18n_parent',
  94. 'config' => array (
  95. 'type' => 'select',
  96. 'items' => array (
  97. array('', 0),
  98. ),
  99. 'foreign_table' => 'sys_file',
  100. 'foreign_table_where' => 'AND sys_file.pid=###CURRENT_PID### AND sys_file.sys_language_uid IN (-1,0)',
  101. )
  102. ),
  103. 'l10n_diffsource' => array (
  104. 'config' => array (
  105. 'type' => 'passthrough'
  106. )
  107. ),
  108. 'hidden' => array (
  109. 'exclude' => 1,
  110. 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden',
  111. 'config' => array (
  112. 'type' => 'check',
  113. 'default' => '0'
  114. )
  115. ),
  116. 'starttime' => array (
  117. 'exclude' => 1,
  118. 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.starttime',
  119. 'config' => array (
  120. 'type' => 'input',
  121. 'size' => '8',
  122. 'max' => '20',
  123. 'eval' => 'date',
  124. 'default' => '0',
  125. 'checkbox' => '0'
  126. )
  127. ),
  128. 'endtime' => array (
  129. 'exclude' => 1,
  130. 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.endtime',
  131. 'config' => array (
  132. 'type' => 'input',
  133. 'size' => '8',
  134. 'max' => '20',
  135. 'eval' => 'date',
  136. 'checkbox' => '0',
  137. 'default' => '0',
  138. 'range' => array (
  139. 'upper' => mktime(3, 14, 7, 1, 19, 2038),
  140. 'lower' => mktime(0, 0, 0, date('m')-1, date('d'), date('Y'))
  141. )
  142. )
  143. ),
  144. 'fe_group' => array (
  145. 'exclude' => 1,
  146. 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.fe_group',
  147. 'config' => array (
  148. 'type' => 'select',
  149. 'items' => array (
  150. array('', 0),
  151. array('LLL:EXT:lang/locallang_general.xml:LGL.hide_at_login', -1),
  152. array('LLL:EXT:lang/locallang_general.xml:LGL.any_login', -2),
  153. array('LLL:EXT:lang/locallang_general.xml:LGL.usergroups', '--div--')
  154. ),
  155. 'foreign_table' => 'fe_groups'
  156. )
  157. ),
  158. 'mount' => array (
  159. 'exclude' => 0,
  160. 'label' => 'LLL:EXT:file/locallang_db.xml:sys_file.mount',
  161. 'config' => array (
  162. 'type' => 'select',
  163. 'items' => array (
  164. array('',0),
  165. ),
  166. 'foreign_table' => 'sys_file_mountpoints',
  167. 'foreign_table_where' => 'ORDER BY sys_file_mountpoints.uid',
  168. 'size' => 1,
  169. 'minitems' => 0,
  170. 'maxitems' => 1,
  171. )
  172. ),
  173. 'name' => array (
  174. 'exclude' => 0,
  175. 'label' => 'LLL:EXT:file/locallang_db.xml:sys_file.name',
  176. 'config' => array (
  177. 'type' => 'input',
  178. 'size' => '30',
  179. )
  180. ),
  181. 'sha1' => array (
  182. 'exclude' => 0,
  183. 'label' => 'LLL:EXT:file/locallang_db.xml:sys_file.sha1',
  184. 'config' => array (
  185. 'type' => 'input',
  186. 'size' => '30',
  187. )
  188. ),
  189. 'size' => array (
  190. 'exclude' => 0,
  191. 'label' => 'LLL:EXT:file/locallang_db.xml:sys_file.size',
  192. 'config' => array (
  193. 'type' => 'input',
  194. 'size' => '4',
  195. 'max' => '4',
  196. 'eval' => 'int',
  197. 'checkbox' => '0',
  198. 'range' => array (
  199. 'upper' => '1000',
  200. 'lower' => '10'
  201. ),
  202. 'default' => 0
  203. )
  204. ),
  205. 'usage_count' => array (
  206. 'exclude' => 1,
  207. 'label' => 'LLL:EXT:lang/locallang_general.xml:usage_count',
  208. 'config' => array (
  209. 'type' => 'group',
  210. 'internal_type' => 'db',
  211. 'allowed' => '*',
  212. 'size' => 5,
  213. 'minitems' => 0,
  214. 'maxitems' => 100,
  215. "MM_hasUidField" => TRUE,
  216. "MM" => "sys_file_references",
  217. )
  218. ),
  219. ),
  220. 'types' => array (
  221. '0' => array('showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;1, mount, name, sha1, size, usage_count')
  222. ),
  223. 'palettes' => array (
  224. '1' => array('showitem' => 'starttime, endtime, fe_group')
  225. )
  226. );
  227. $TCA['sys_file_references'] = array (
  228. 'ctrl' => $TCA['sys_file_references']['ctrl'],
  229. 'interface' => array (
  230. 'showRecordFieldList' => 'hidden,uid_local,uid_foreign,tablenames,fieldname,sorting_foreign,table_local,title,description,downloadname'
  231. ),
  232. 'feInterface' => $TCA['sys_file_references']['feInterface'],
  233. 'columns' => array (
  234. 'hidden' => array (
  235. 'exclude' => 1,
  236. 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden',
  237. 'config' => array (
  238. 'type' => 'check',
  239. 'default' => '0'
  240. )
  241. ),
  242. 'uid_local' => array (
  243. 'exclude' => 0,
  244. 'label' => 'LLL:EXT:file/locallang_db.xml:sys_file_references.uid_local',
  245. 'config' => array (
  246. 'type' => 'select',
  247. 'items' => array (
  248. array('',0),
  249. ),
  250. 'foreign_table' => 'sys_file',
  251. 'foreign_table_where' => 'ORDER BY sys_file.uid',
  252. 'size' => 1,
  253. 'minitems' => 0,
  254. 'maxitems' => 1,
  255. )
  256. ),
  257. 'uid_foreign' => array (
  258. 'exclude' => 0,
  259. 'label' => 'LLL:EXT:file/locallang_db.xml:sys_file_references.uid_foreign',
  260. 'config' => array (
  261. 'type' => 'select',
  262. 'items' => array (
  263. array('',0),
  264. ),
  265. 'foreign_table' => 'tt_content',
  266. 'foreign_table_where' => 'ORDER BY tt_content.uid',
  267. 'size' => 1,
  268. 'minitems' => 0,
  269. 'maxitems' => 1,
  270. )
  271. ),
  272. 'tablenames' => array (
  273. 'exclude' => 0,
  274. 'label' => 'LLL:EXT:file/locallang_db.xml:sys_file_references.tablenames',
  275. 'config' => array (
  276. 'type' => 'input',
  277. 'size' => '30',
  278. 'eval' => 'trim',
  279. )
  280. ),
  281. 'fieldname' => array (
  282. 'exclude' => 0,
  283. 'label' => 'LLL:EXT:file/locallang_db.xml:sys_file_references.fieldname',
  284. 'config' => array (
  285. 'type' => 'input',
  286. 'size' => '30',
  287. 'default' => 'images',
  288. )
  289. ),
  290. 'sorting_foreign' => array (
  291. 'exclude' => 0,
  292. 'label' => 'LLL:EXT:file/locallang_db.xml:sys_file_references.sorting_foreign',
  293. 'config' => array (
  294. 'type' => 'input',
  295. 'size' => '4',
  296. 'max' => '4',
  297. 'eval' => 'int',
  298. 'checkbox' => '0',
  299. 'range' => array (
  300. 'upper' => '1000',
  301. 'lower' => '10'
  302. ),
  303. 'default' => 0
  304. )
  305. ),
  306. 'table_local' => array (
  307. 'exclude' => 0,
  308. 'label' => 'LLL:EXT:file/locallang_db.xml:sys_file_references.table_local',
  309. 'config' => array (
  310. 'type' => 'input',
  311. 'size' => '30',
  312. 'default' => 'sys_file',
  313. )
  314. ),
  315. 'title' => array (
  316. 'exclude' => 0,
  317. 'label' => 'LLL:EXT:file/locallang_db.xml:sys_file_references.title',
  318. 'config' => array (
  319. 'type' => 'input',
  320. 'size' => '30',
  321. )
  322. ),
  323. 'description' => array (
  324. 'exclude' => 0,
  325. 'label' => 'LLL:EXT:file/locallang_db.xml:sys_file_references.description',
  326. 'config' => array (
  327. 'type' => 'text',
  328. 'cols' => '30',
  329. 'rows' => '5',
  330. )
  331. ),
  332. 'downloadname' => array (
  333. 'exclude' => 0,
  334. 'label' => 'LLL:EXT:file/locallang_db.xml:sys_file_references.downloadname',
  335. 'config' => array (
  336. 'type' => 'input',
  337. 'size' => '30',
  338. )
  339. ),
  340. ),
  341. 'types' => array (
  342. '0' => array('showitem' => 'hidden;;1;;1-1-1, uid_local, uid_foreign, tablenames, fieldname, sorting_foreign, table_local, title;;;;2-2-2, description;;;;3-3-3, downloadname')
  343. ),
  344. 'palettes' => array (
  345. '1' => array('showitem' => '')
  346. )
  347. );
  348. $TCA['sys_file_collection'] = array (
  349. 'ctrl' => $TCA['sys_file_collection']['ctrl'],
  350. 'interface' => array (
  351. 'showRecordFieldList' => 'sys_language_uid,l10n_parent,l10n_diffsource,hidden,starttime,endtime,fe_group,files,name'
  352. ),
  353. 'feInterface' => $TCA['sys_file_collection']['feInterface'],
  354. 'columns' => array (
  355. 't3ver_label' => array (
  356. 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.versionLabel',
  357. 'config' => array (
  358. 'type' => 'input',
  359. 'size' => '30',
  360. 'max' => '30',
  361. )
  362. ),
  363. 'sys_language_uid' => array (
  364. 'exclude' => 1,
  365. 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.language',
  366. 'config' => array (
  367. 'type' => 'select',
  368. 'foreign_table' => 'sys_language',
  369. 'foreign_table_where' => 'ORDER BY sys_language.title',
  370. 'items' => array(
  371. array('LLL:EXT:lang/locallang_general.xml:LGL.allLanguages', -1),
  372. array('LLL:EXT:lang/locallang_general.xml:LGL.default_value', 0)
  373. )
  374. )
  375. ),
  376. 'l10n_parent' => array (
  377. 'displayCond' => 'FIELD:sys_language_uid:>:0',
  378. 'exclude' => 1,
  379. 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.l18n_parent',
  380. 'config' => array (
  381. 'type' => 'select',
  382. 'items' => array (
  383. array('', 0),
  384. ),
  385. 'foreign_table' => 'sys_file_collection',
  386. 'foreign_table_where' => 'AND sys_file_collection.pid=###CURRENT_PID### AND sys_file_collection.sys_language_uid IN (-1,0)',
  387. )
  388. ),
  389. 'l10n_diffsource' => array (
  390. 'config' => array (
  391. 'type' => 'passthrough'
  392. )
  393. ),
  394. 'hidden' => array (
  395. 'exclude' => 1,
  396. 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden',
  397. 'config' => array (
  398. 'type' => 'check',
  399. 'default' => '0'
  400. )
  401. ),
  402. 'starttime' => array (
  403. 'exclude' => 1,
  404. 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.starttime',
  405. 'config' => array (
  406. 'type' => 'input',
  407. 'size' => '8',
  408. 'max' => '20',
  409. 'eval' => 'date',
  410. 'default' => '0',
  411. 'checkbox' => '0'
  412. )
  413. ),
  414. 'endtime' => array (
  415. 'exclude' => 1,
  416. 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.endtime',
  417. 'config' => array (
  418. 'type' => 'input',
  419. 'size' => '8',
  420. 'max' => '20',
  421. 'eval' => 'date',
  422. 'checkbox' => '0',
  423. 'default' => '0',
  424. 'range' => array (
  425. 'upper' => mktime(3, 14, 7, 1, 19, 2038),
  426. 'lower' => mktime(0, 0, 0, date('m')-1, date('d'), date('Y'))
  427. )
  428. )
  429. ),
  430. 'fe_group' => array (
  431. 'exclude' => 1,
  432. 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.fe_group',
  433. 'config' => array (
  434. 'type' => 'select',
  435. 'items' => array (
  436. array('', 0),
  437. array('LLL:EXT:lang/locallang_general.xml:LGL.hide_at_login', -1),
  438. array('LLL:EXT:lang/locallang_general.xml:LGL.any_login', -2),
  439. array('LLL:EXT:lang/locallang_general.xml:LGL.usergroups', '--div--')
  440. ),
  441. 'foreign_table' => 'fe_groups'
  442. )
  443. ),
  444. 'files' => array (
  445. 'exclude' => 0,
  446. 'label' => 'LLL:EXT:file/locallang_db.xml:sys_file_collection.files',
  447. 'config' => array (
  448. 'type' => 'inline',
  449. 'foreign_table' => 'sys_file_references',
  450. 'foreign_field' => 'uid_foreign',
  451. 'foreign_sortby' => 'sorting_foreign',
  452. 'foreign_table_field' => 'tablenames',
  453. 'foreign_label' => 'uid_local',
  454. 'foreign_selector' => 'uid_local',
  455. )
  456. ),
  457. 'name' => array (
  458. 'exclude' => 0,
  459. 'label' => 'LLL:EXT:file/locallang_db.xml:sys_file_collection.name',
  460. 'config' => array (
  461. 'type' => 'input',
  462. 'size' => '30',
  463. )
  464. ),
  465. ),
  466. 'types' => array (
  467. '0' => array('showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;1, name, files')
  468. ),
  469. 'palettes' => array (
  470. '1' => array('showitem' => 'starttime, endtime, fe_group')
  471. )
  472. );
  473. ?>