PageRenderTime 71ms CodeModel.GetById 39ms RepoModel.GetById 0ms app.codeStats 0ms

/typo3conf/ext/ew_calendar/tca.php

https://github.com/papapapagei/rr
PHP | 351 lines | 345 code | 4 blank | 2 comment | 1 complexity | 6c539a41e54f5c37da21ccf99ac6d8a2 MD5 | raw file
  1. <?php
  2. if (!defined ('TYPO3_MODE')) die ('Access denied.');
  3. // CALENDAR
  4. $TCA['tx_ewcalendar_dates'] = array (
  5. 'ctrl' => $TCA['tx_ewcalendar_dates']['ctrl'],
  6. 'interface' => array (
  7. 'showRecordFieldList' => 'sys_language_uid,l10n_parent,l10n_diffsource,hidden,starttime,endtime,title,info,date,only_month,dont_teaser,image,facts,link_title,link'
  8. ),
  9. 'feInterface' => $TCA['tx_ewcalendar_dates']['feInterface'],
  10. 'columns' => array (
  11. 'sys_language_uid' => array (
  12. 'exclude' => 1,
  13. 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.language',
  14. 'config' => array (
  15. 'type' => 'select',
  16. 'foreign_table' => 'sys_language',
  17. 'foreign_table_where' => 'ORDER BY sys_language.title',
  18. 'items' => array(
  19. array('LLL:EXT:lang/locallang_general.xml:LGL.allLanguages', -1),
  20. array('LLL:EXT:lang/locallang_general.xml:LGL.default_value', 0)
  21. )
  22. )
  23. ),
  24. 'l10n_parent' => array (
  25. 'displayCond' => 'FIELD:sys_language_uid:>:0',
  26. 'exclude' => 1,
  27. 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.l18n_parent',
  28. 'config' => array (
  29. 'type' => 'select',
  30. 'items' => array (
  31. array('', 0),
  32. ),
  33. 'foreign_table' => 'tx_ewcalendar_dates',
  34. 'foreign_table_where' => 'AND tx_ewcalendar_dates.pid=###CURRENT_PID### AND tx_ewcalendar_dates.sys_language_uid IN (-1,0)',
  35. )
  36. ),
  37. 'l10n_diffsource' => array (
  38. 'config' => array (
  39. 'type' => 'passthrough'
  40. )
  41. ),
  42. 'hidden' => array (
  43. 'exclude' => 1,
  44. 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden',
  45. 'config' => array (
  46. 'type' => 'check',
  47. 'default' => '0'
  48. )
  49. ),
  50. 'starttime' => array (
  51. 'exclude' => 1,
  52. 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.starttime',
  53. 'config' => array (
  54. 'type' => 'input',
  55. 'size' => '8',
  56. 'max' => '20',
  57. 'eval' => 'date',
  58. 'default' => '0',
  59. 'checkbox' => '0'
  60. )
  61. ),
  62. 'endtime' => array (
  63. 'exclude' => 1,
  64. 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.endtime',
  65. 'config' => array (
  66. 'type' => 'input',
  67. 'size' => '8',
  68. 'max' => '20',
  69. 'eval' => 'date',
  70. 'checkbox' => '0',
  71. 'default' => '0',
  72. 'range' => array (
  73. 'upper' => mktime(3, 14, 7, 1, 19, 2038),
  74. 'lower' => mktime(0, 0, 0, date('m')-1, date('d'), date('Y'))
  75. )
  76. )
  77. ),
  78. 'title' => array (
  79. 'exclude' => 0,
  80. 'label' => 'LLL:EXT:ew_calendar/locallang_db.xml:tx_ewcalendar_dates.title',
  81. 'config' => array (
  82. 'type' => 'input',
  83. 'size' => '30',
  84. 'eval' => '',
  85. )
  86. ),
  87. 'production' => array (
  88. 'exclude' => 0,
  89. 'label' => 'LLL:EXT:ew_calendar/locallang_db.xml:tx_ewcalendar_dates.production',
  90. 'l10n_mode' => 'exclude',
  91. 'config' => array (
  92. 'type' => 'select',
  93. 'items' => array (
  94. array('', 0),
  95. ),
  96. 'foreign_table' => 'tx_ewcalendar_productions',
  97. )
  98. ),
  99. 'highlight' => array (
  100. 'exclude' => 0,
  101. 'label' => 'LLL:EXT:ew_calendar/locallang_db.xml:tx_ewcalendar_dates.highlight',
  102. 'l10n_mode' => 'exclude',
  103. 'config' => array (
  104. 'type' => 'check',
  105. )
  106. ),
  107. 'info' => array (
  108. 'exclude' => 0,
  109. 'label' => 'LLL:EXT:ew_calendar/locallang_db.xml:tx_ewcalendar_dates.info',
  110. 'config' => array (
  111. 'type' => 'input',
  112. 'size' => '30',
  113. 'eval' => 'required',
  114. )
  115. ),
  116. 'info_size' => array (
  117. 'exclude' => 0,
  118. 'label' => 'LLL:EXT:ew_calendar/locallang_db.xml:tx_ewcalendar_dates.info_size',
  119. 'config' => array (
  120. 'type' => 'select',
  121. 'items' => Array (
  122. Array('LLL:EXT:ew_calendar/locallang_db.xml:tx_ewcalendar_dates.info_size.normal', ''),
  123. Array('LLL:EXT:ew_calendar/locallang_db.xml:tx_ewcalendar_dates.info_size.small', '-1'),
  124. Array('LLL:EXT:ew_calendar/locallang_db.xml:tx_ewcalendar_dates.info_size.smaller', '-2'),
  125. )
  126. )
  127. ),
  128. 'date' => array (
  129. 'exclude' => 0,
  130. 'label' => 'LLL:EXT:ew_calendar/locallang_db.xml:tx_ewcalendar_dates.date',
  131. 'l10n_mode' => 'exclude',
  132. 'config' => array (
  133. 'type' => 'input',
  134. 'size' => '8',
  135. 'max' => '20',
  136. 'eval' => 'date',
  137. 'default' => '0'
  138. )
  139. ),
  140. 'only_month' => array (
  141. 'exclude' => 0,
  142. 'label' => 'LLL:EXT:ew_calendar/locallang_db.xml:tx_ewcalendar_dates.only_month',
  143. 'l10n_mode' => 'exclude',
  144. 'config' => array (
  145. 'type' => 'check',
  146. )
  147. ),
  148. 'dont_teaser' => array (
  149. 'exclude' => 0,
  150. 'label' => 'LLL:EXT:ew_calendar/locallang_db.xml:tx_ewcalendar_dates.dont_teaser',
  151. 'l10n_mode' => 'exclude',
  152. 'config' => array (
  153. 'type' => 'check',
  154. 'default' => 1,
  155. )
  156. ),
  157. 'image' => txdam_getMediaTCA('image_field', 'image'),
  158. 'facts' => array (
  159. 'exclude' => 0,
  160. 'label' => 'LLL:EXT:ew_calendar/locallang_db.xml:tx_ewcalendar_dates.facts',
  161. 'config' => array (
  162. 'type' => 'text',
  163. 'cols' => '30',
  164. 'rows' => '5',
  165. )
  166. ),
  167. 'link_title' => array (
  168. 'exclude' => 0,
  169. 'label' => 'LLL:EXT:ew_calendar/locallang_db.xml:tx_ewcalendar_dates.link_title',
  170. 'config' => array (
  171. 'type' => 'input',
  172. 'size' => '30',
  173. )
  174. ),
  175. 'link_text' => array (
  176. 'exclude' => 0,
  177. 'label' => 'LLL:EXT:ew_calendar/locallang_db.xml:tx_ewcalendar_dates.link_text',
  178. 'config' => array (
  179. 'type' => 'input',
  180. 'size' => '20',
  181. )
  182. ),
  183. 'link' => array (
  184. 'exclude' => 0,
  185. 'label' => 'LLL:EXT:ew_calendar/locallang_db.xml:tx_ewcalendar_dates.link',
  186. 'config' => array (
  187. 'type' => 'input',
  188. 'size' => '15',
  189. 'max' => '255',
  190. 'checkbox' => '',
  191. 'eval' => 'trim',
  192. 'wizards' => array(
  193. '_PADDING' => 2,
  194. 'link' => array(
  195. 'type' => 'popup',
  196. 'title' => 'Link',
  197. 'icon' => 'link_popup.gif',
  198. 'script' => 'browse_links.php?mode=wizard',
  199. 'JSopenParams' => 'height=300,width=500,status=0,menubar=0,scrollbars=1'
  200. )
  201. )
  202. )
  203. ),
  204. ),
  205. 'types' => array (
  206. '0' => array('showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;, title;;2;;2-2-2, date;;3, image, facts, link_title;;4')
  207. ),
  208. 'palettes' => array (
  209. '1' => array('showitem' => 'starttime, endtime'),
  210. '2' => array('showitem' => 'production,info,info_size'),
  211. '3' => array('showitem' => 'highlight,only_month,dont_teaser'),
  212. '4' => array('showitem' => 'link,link_text'),
  213. )
  214. );
  215. $TCA['tx_ewcalendar_dates']['columns']['image']['label'] = 'LLL:EXT:ew_calendar/locallang_db.xml:tx_ewcalendar_dates.image';
  216. $TCA['tx_ewcalendar_dates']['columns']['image']['config']['maxitems'] = 1;
  217. $TCA['tx_ewcalendar_dates']['columns']['image']['config']['size'] = 1;
  218. $TCA['tx_ewcalendar_dates']['columns']['image']['l10n_mode'] = 'exclude';
  219. // PRODUCTIONS
  220. $TCA['tx_ewcalendar_productions'] = array (
  221. 'ctrl' => $TCA['tx_ewcalendar_productions']['ctrl'],
  222. 'interface' => array (
  223. 'showRecordFieldList' => 'sys_language_uid,l10n_parent,l10n_diffsource,hidden,starttime,endtime,title,link,image,facts'
  224. ),
  225. 'feInterface' => $TCA['tx_ewcalendar_productions']['feInterface'],
  226. 'columns' => array (
  227. 'sys_language_uid' => array (
  228. 'exclude' => 1,
  229. 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.language',
  230. 'config' => array (
  231. 'type' => 'select',
  232. 'foreign_table' => 'sys_language',
  233. 'foreign_table_where' => 'ORDER BY sys_language.title',
  234. 'items' => array(
  235. array('LLL:EXT:lang/locallang_general.xml:LGL.allLanguages', -1),
  236. array('LLL:EXT:lang/locallang_general.xml:LGL.default_value', 0)
  237. )
  238. )
  239. ),
  240. 'l10n_parent' => array (
  241. 'displayCond' => 'FIELD:sys_language_uid:>:0',
  242. 'exclude' => 1,
  243. 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.l18n_parent',
  244. 'config' => array (
  245. 'type' => 'select',
  246. 'items' => array (
  247. array('', 0),
  248. ),
  249. 'foreign_table' => 'tx_ewcalendar_productions',
  250. 'foreign_table_where' => 'AND tx_ewcalendar_productions.pid=###CURRENT_PID### AND tx_ewcalendar_productions.sys_language_uid IN (-1,0)',
  251. )
  252. ),
  253. 'l10n_diffsource' => array (
  254. 'config' => array (
  255. 'type' => 'passthrough'
  256. )
  257. ),
  258. 'hidden' => array (
  259. 'exclude' => 1,
  260. 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden',
  261. 'config' => array (
  262. 'type' => 'check',
  263. 'default' => '0'
  264. )
  265. ),
  266. 'starttime' => array (
  267. 'exclude' => 1,
  268. 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.starttime',
  269. 'config' => array (
  270. 'type' => 'input',
  271. 'size' => '8',
  272. 'max' => '20',
  273. 'eval' => 'date',
  274. 'default' => '0',
  275. 'checkbox' => '0'
  276. )
  277. ),
  278. 'endtime' => array (
  279. 'exclude' => 1,
  280. 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.endtime',
  281. 'config' => array (
  282. 'type' => 'input',
  283. 'size' => '8',
  284. 'max' => '20',
  285. 'eval' => 'date',
  286. 'checkbox' => '0',
  287. 'default' => '0',
  288. 'range' => array (
  289. 'upper' => mktime(3, 14, 7, 1, 19, 2038),
  290. 'lower' => mktime(0, 0, 0, date('m')-1, date('d'), date('Y'))
  291. )
  292. )
  293. ),
  294. 'title' => array (
  295. 'exclude' => 0,
  296. 'label' => 'LLL:EXT:ew_calendar/locallang_db.xml:tx_ewcalendar_productions.title',
  297. 'config' => array (
  298. 'type' => 'input',
  299. 'size' => '30',
  300. 'eval' => 'required',
  301. )
  302. ),
  303. 'link' => array (
  304. 'exclude' => 0,
  305. 'label' => 'LLL:EXT:ew_calendar/locallang_db.xml:tx_ewcalendar_productions.link',
  306. 'l10n_mode' => 'exclude',
  307. 'config' => array (
  308. 'type' => 'input',
  309. 'size' => '15',
  310. 'max' => '255',
  311. 'checkbox' => '',
  312. 'eval' => 'trim',
  313. 'wizards' => array(
  314. '_PADDING' => 2,
  315. 'link' => array(
  316. 'type' => 'popup',
  317. 'title' => 'Link',
  318. 'icon' => 'link_popup.gif',
  319. 'script' => 'browse_links.php?mode=wizard',
  320. 'JSopenParams' => 'height=300,width=500,status=0,menubar=0,scrollbars=1'
  321. )
  322. )
  323. )
  324. ),
  325. 'image' => txdam_getMediaTCA('image_field', 'image'),
  326. 'facts' => array (
  327. 'exclude' => 0,
  328. 'label' => 'LLL:EXT:ew_calendar/locallang_db.xml:tx_ewcalendar_productions.facts',
  329. 'config' => array (
  330. 'type' => 'text',
  331. 'cols' => '30',
  332. 'rows' => '5',
  333. )
  334. ),
  335. ),
  336. 'types' => array (
  337. '0' => array('showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;, title;;1;;2-2-2, image, facts')
  338. ),
  339. 'palettes' => array (
  340. '1' => array('showitem' => 'link'),
  341. )
  342. );
  343. $TCA['tx_ewcalendar_productions']['columns']['image']['label'] = 'LLL:EXT:ew_calendar/locallang_db.xml:tx_ewcalendar_productions.image';
  344. $TCA['tx_ewcalendar_productions']['columns']['image']['config']['maxitems'] = 1;
  345. $TCA['tx_ewcalendar_productions']['columns']['image']['config']['size'] = 1;
  346. $TCA['tx_ewcalendar_productions']['columns']['image']['l10n_mode'] = 'exclude';
  347. ?>