[TASK] Cleanup TCA select field configuration
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Configuration / TCA / sys_collection.php
1 <?php
2 return array(
3 'ctrl' => array(
4 'title' => 'LLL:EXT:lang/locallang_tca.xlf:sys_collection',
5 'label' => 'title',
6 'tstamp' => 'tstamp',
7 'crdate' => 'crdate',
8 'cruser_id' => 'cruser_id',
9 'versioningWS' => TRUE,
10 'origUid' => 't3_origuid',
11 'languageField' => 'sys_language_uid',
12 'transOrigPointerField' => 'l10n_parent',
13 'transOrigDiffSourceField' => 'l10n_diffsource',
14 'default_sortby' => 'ORDER BY crdate',
15 'delete' => 'deleted',
16 'type' => 'type',
17 'rootLevel' => -1,
18 'searchFields' => 'title,description',
19 'typeicon_column' => 'type',
20 'typeicon_classes' => array(
21 'default' => 'apps-clipboard-list',
22 'static' => 'apps-clipboard-list',
23 'filter' => 'actions-system-tree-search-open'
24 ),
25 'enablecolumns' => array(
26 'disabled' => 'hidden',
27 'starttime' => 'starttime',
28 'endtime' => 'endtime',
29 'fe_group' => 'fe_group'
30 ),
31 ),
32 'interface' => array(
33 'showRecordFieldList' => 'title, description, table_name, items'
34 ),
35 'columns' => array(
36 't3ver_label' => array(
37 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel',
38 'config' => array(
39 'type' => 'input',
40 'size' => '30',
41 'max' => '30'
42 )
43 ),
44 'sys_language_uid' => array(
45 'exclude' => 1,
46 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language',
47 'config' => array(
48 'type' => 'select',
49 'renderType' => 'selectSingle',
50 'foreign_table' => 'sys_language',
51 'foreign_table_where' => 'ORDER BY sys_language.title',
52 'items' => array(
53 array('LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1),
54 array('LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0)
55 ),
56 'default' => 0
57 )
58 ),
59 'l10n_parent' => array(
60 'displayCond' => 'FIELD:sys_language_uid:>:0',
61 'exclude' => 1,
62 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent',
63 'config' => array(
64 'type' => 'select',
65 'renderType' => 'selectSingle',
66 'items' => array(
67 array('', 0)
68 ),
69 'foreign_table' => 'sys_file_collection',
70 'foreign_table_where' => 'AND sys_file_collection.pid=###CURRENT_PID### AND sys_file_collection.sys_language_uid IN (-1,0)'
71 )
72 ),
73 'l10n_diffsource' => array(
74 'config' => array(
75 'type' => 'passthrough',
76 'default' => ''
77 )
78 ),
79 'hidden' => array(
80 'exclude' => 1,
81 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden',
82 'config' => array(
83 'type' => 'check',
84 'default' => '0'
85 )
86 ),
87 'starttime' => array(
88 'exclude' => 1,
89 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.starttime',
90 'config' => array(
91 'type' => 'input',
92 'size' => '8',
93 'max' => '20',
94 'eval' => 'date',
95 'default' => '0',
96 'checkbox' => '0'
97 )
98 ),
99 'endtime' => array(
100 'exclude' => 1,
101 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.endtime',
102 'config' => array(
103 'type' => 'input',
104 'size' => '8',
105 'max' => '20',
106 'eval' => 'date',
107 'checkbox' => '0',
108 'default' => '0',
109 'range' => array(
110 'upper' => mktime(0, 0, 0, 1, 1, 2038),
111 )
112 )
113 ),
114 'fe_group' => array(
115 'exclude' => 1,
116 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.fe_group',
117 'config' => array(
118 'type' => 'select',
119 'renderType' => 'selectSingle',
120 'items' => array(
121 array('', 0),
122 array('LLL:EXT:lang/locallang_general.xlf:LGL.hide_at_login', -1),
123 array('LLL:EXT:lang/locallang_general.xlf:LGL.any_login', -2),
124 array('LLL:EXT:lang/locallang_general.xlf:LGL.usergroups', '--div--')
125 ),
126 'foreign_table' => 'fe_groups'
127 )
128 ),
129 'table_name' => array(
130 'exclude' => 0,
131 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_collection.table_name',
132 'config' => array(
133 'type' => 'select',
134 'renderType' => 'selectSingle',
135 'special' => 'tables'
136 )
137 ),
138 'items' => array(
139 'exclude' => 0,
140 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_collection.items',
141 'config' => array(
142 'type' => 'group',
143 'internal_type' => 'db',
144 'prepend_tname' => TRUE,
145 'allowed' => '*',
146 'MM' => 'sys_collection_entries',
147 'MM_hasUidField' => TRUE,
148 'multiple' => TRUE,
149 'size' => 5
150 )
151 ),
152 'title' => array(
153 'exclude' => 0,
154 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_collection.title',
155 'config' => array(
156 'type' => 'input',
157 'size' => '60',
158 'eval' => 'required'
159 )
160 ),
161 'description' => array(
162 'exclude' => 0,
163 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_collection.description',
164 'config' => array(
165 'type' => 'text',
166 'cols' => '60',
167 'rows' => '5'
168 )
169 ),
170 'type' => array(
171 'exclude' => 0,
172 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_collection.type',
173 'config' => array(
174 'type' => 'select',
175 'renderType' => 'selectSingle',
176 'items' => array(
177 array('LLL:EXT:lang/locallang_tca.xlf:sys_collection.type.static', 'static')
178 ),
179 'default' => 'static'
180 )
181 )
182 ),
183 'types' => array(
184 'static' => array(
185 'showitem' => 'title, --palette--;;1, type, description,table_name, items',
186 ),
187 ),
188 'palettes' => array(
189 '1' => array('showitem' => 'starttime, endtime, fe_group, sys_language_uid, l10n_parent, l10n_diffsource, hidden')
190 )
191 );