[CLEANUP] Final cleanup of TCA Overrides
[Packages/TYPO3.CMS.git] / typo3 / sysext / filemetadata / Configuration / TCA / Overrides / sys_file_metadata.php
1 <?php
2 defined('TYPO3_MODE') or die();
3
4 $tca = array(
5 'ctrl' => array(
6 'type' => 'file:type',
7 ),
8 'types' => array(
9 TYPO3\CMS\Core\Resource\File::FILETYPE_UNKNOWN => array('showitem' => '
10 fileinfo, title, description, alternative, keywords, caption, download_name,
11
12 --div--;LLL:EXT:cms/locallang_ttc.xml:tabs.access,
13 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10;; ,
14 fe_groups,
15
16 --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
17 creator, --palette--;;20;;,
18 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.geo_location;40;;'),
19
20 TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => array('showitem' => '
21 fileinfo, title, description, alternative, keywords, caption, download_name,
22
23 --div--;LLL:EXT:cms/locallang_ttc.xml:tabs.access,
24 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10;; ,
25 fe_groups,
26
27 --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
28 creator, --palette--;;20;;,
29 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.geo_location;40;;,
30 language'),
31
32 TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => array('showitem' => '
33 fileinfo, title, description, alternative, keywords, caption, download_name,
34
35 --div--;LLL:EXT:cms/locallang_ttc.xml:tabs.access,
36 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10;; ,
37 fe_groups,
38
39 --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
40 creator, --palette--;;20;;,
41 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.geo_location;40;; ,
42 --palette--;;30;;,
43 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.metrics;50;;'),
44
45 TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => array('showitem' => '
46
47 fileinfo, title, description, alternative, keywords, caption, download_name,
48
49 --div--;LLL:EXT:cms/locallang_ttc.xml:tabs.access,
50 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10;; ,
51 fe_groups,
52
53 --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
54 duration,
55 creator, --palette--;;20;;, language'),
56
57 TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => array('showitem' => '
58 fileinfo, title, description, alternative, keywords, caption, download_name,
59
60 --div--;LLL:EXT:cms/locallang_ttc.xml:tabs.access,
61 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10;; ,
62 fe_groups,
63
64 --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
65 duration,
66 creator, --palette--;;20;;, language'),
67
68 TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => array('showitem' => '
69 fileinfo, title, description, alternative, keywords, caption, download_name,
70
71 --div--;LLL:EXT:cms/locallang_ttc.xml:tabs.access,
72 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility;10;; ,
73 fe_groups,
74
75 --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
76 creator, --palette--;;20;;,
77 --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.geo_location;40;; ,
78 language, --palette--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.content_date;60;;, pages'),
79 ),
80 'palettes' => array(
81 '10' => array('showitem' => 'visible, status, ranking', 'canNotCollapse' => '1'),
82 '20' => array('showitem' => 'creator_tool, publisher, source', 'canNotCollapse' => '1'),
83 '30' => array('showitem' => 'latitude, longitude', 'canNotCollapse' => '1'),
84 '40' => array('showitem' => 'location_country, location_region, location_city', 'canNotCollapse' => '1'),
85 '50' => array('showitem' => 'width, height, unit, color_space', 'canNotCollapse' => '1'),
86 '60' => array('showitem' => 'content_creation_date, content_modification_date', 'canNotCollapse' => '1'),
87 ),
88 'columns' => array(
89 'visible' => array(
90 'exclude' => 1,
91 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.visible',
92 'config' => array(
93 'type' => 'check',
94 'default' => '1'
95 ),
96 ),
97 'status' => array(
98 'exclude' => 1,
99 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.status',
100 'config' => array(
101 'type' => 'select',
102 'items' => array(
103 array(
104 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.status.1',
105 1,
106 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('filemetadata') . 'Resources/Public/Icons/status_1.png'
107 ),
108 array(
109 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.status.2',
110 2,
111 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('filemetadata') . 'Resources/Public/Icons/status_2.png'
112 ),
113 array(
114 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.status.3',
115 3,
116 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('filemetadata') . 'Resources/Public/Icons/status_3.png'
117 ),
118 ),
119 ),
120 ),
121 'keywords' => array(
122 'exclude' => 1,
123 'l10n_mode' => 'prefixLangTitle',
124 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.keywords',
125 'config' => array(
126 'placeholder' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:placeholder.keywords',
127 'type' => 'input',
128 'size' => 255,
129 'eval' => 'trim'
130 ),
131 ),
132 'caption' => array(
133 'exclude' => 1,
134 'l10n_mode' => 'prefixLangTitle',
135 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.caption',
136 'config' => array(
137 'type' => 'input',
138 'size' => 30,
139 'eval' => 'trim'
140 ),
141 ),
142 'creator_tool' => array(
143 'exclude' => 1,
144 'l10n_mode' => 'exclude',
145 'l10n_display' => 'defaultAsReadonly',
146 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.creator_tool',
147 'config' => array(
148 'type' => 'input',
149 'size' => 20,
150 'eval' => 'trim'
151 ),
152 ),
153 'download_name' => array(
154 'exclude' => 1,
155 'l10n_mode' => 'exclude',
156 'l10n_display' => 'defaultAsReadonly',
157 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.download_name',
158 'config' => array(
159 'type' => 'input',
160 'size' => 30,
161 'eval' => 'trim'
162 ),
163 ),
164 'creator' => array(
165 'exclude' => 1,
166 'l10n_mode' => 'exclude',
167 'l10n_display' => 'defaultAsReadonly',
168 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.creator',
169 'config' => array(
170 'type' => 'input',
171 'size' => 30,
172 'eval' => 'trim'
173 ),
174 ),
175 'publisher' => array(
176 'exclude' => 1,
177 'l10n_mode' => 'exclude',
178 'l10n_display' => 'defaultAsReadonly',
179 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.publisher',
180 'config' => array(
181 'type' => 'input',
182 'size' => 20,
183 'eval' => 'trim'
184 ),
185 ),
186 'source' => array(
187 'exclude' => 1,
188 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.source',
189 'config' => array(
190 'type' => 'input',
191 'size' => 20,
192 'eval' => 'trim'
193 ),
194 ),
195 'location_country' => array(
196 'exclude' => 1,
197 'l10n_mode' => 'mergeIfNotBlank',
198 'l10n_display' => '',
199 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.location_country',
200 'config' => array(
201 'type' => 'input',
202 'size' => 20,
203 'eval' => 'trim'
204 ),
205 ),
206 'location_region' => array(
207 'exclude' => 1,
208 'l10n_mode' => 'mergeIfNotBlank',
209 'l10n_display' => '',
210 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.location_region',
211 'config' => array(
212 'type' => 'input',
213 'size' => 20,
214 'eval' => 'trim'
215 ),
216 ),
217 'location_city' => array(
218 'exclude' => 1,
219 'l10n_mode' => 'mergeIfNotBlank',
220 'l10n_display' => '',
221 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.location_city',
222 'config' => array(
223 'type' => 'input',
224 'size' => 20,
225 'eval' => 'trim'
226 ),
227 ),
228 'latitude' => array(
229 'exclude' => 1,
230 'l10n_mode' => 'exclude',
231 'l10n_display' => 'defaultAsReadonly',
232 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.latitude',
233 'config' => array(
234 'type' => 'input',
235 'size' => '20',
236 'eval' => 'trim',
237 'max' => '30',
238 'default' => '0.00000000000000'
239 ),
240 ),
241 'longitude' => array(
242 'exclude' => 1,
243 'l10n_mode' => 'exclude',
244 'l10n_display' => 'defaultAsReadonly',
245 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.longitude',
246 'config' => array(
247 'type' => 'input',
248 'size' => '20',
249 'eval' => 'trim',
250 'max' => '30',
251 'default' => '0.00000000000000'
252 ),
253 ),
254 'ranking' => array(
255 'exclude' => 1,
256 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.ranking',
257 'config' => array(
258 'type' => 'select',
259 'minitems' => 1,
260 'maxitems' => 1,
261 'items' => array(
262 array(1, 1),
263 array(2, 2),
264 array(3, 3),
265 array(4, 4),
266 array(5, 5),
267 ),
268 ),
269 ),
270 'content_creation_date' => array(
271 'exclude' => 1,
272 'l10n_mode' => 'exclude',
273 'l10n_display' => 'defaultAsReadonly',
274 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.content_creation_date',
275 'config' => array(
276 'type' => 'input',
277 'size' => 12,
278 'max' => 20,
279 'eval' => 'date',
280 'checkbox' => 1,
281 'default' => time()
282 ),
283 ),
284 'content_modification_date' => array(
285 'exclude' => 1,
286 'l10n_mode' => 'exclude',
287 'l10n_display' => 'defaultAsReadonly',
288 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.content_modification_date',
289 'config' => array(
290 'type' => 'input',
291 'size' => 12,
292 'max' => 20,
293 'eval' => 'date',
294 'checkbox' => 1,
295 'default' => time()
296 ),
297 ),
298 'note' => array(
299 'exclude' => 1,
300 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.note',
301 'config' => array(
302 'type' => 'text',
303 'cols' => 40,
304 'rows' => 15,
305 'eval' => 'trim'
306 ),
307 ),
308 /*
309 * METRICS ###########################################
310 */
311 'unit' => array(
312 'exclude' => 1,
313 'l10n_mode' => 'exclude',
314 'l10n_display' => 'defaultAsReadonly',
315 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.unit',
316 'config' => array(
317 'type' => 'select',
318 'items' => array(
319 array('', ''),
320 array('px', 'px'),
321 array('mm', 'mm'),
322 array('cm', 'cm'),
323 array('m', 'm'),
324 array('p', 'p'),
325 ),
326 'default' => '',
327 'readOnly' => TRUE,
328 ),
329 ),
330 'duration' => array(
331 'exclude' => 1,
332 'l10n_mode' => 'exclude',
333 'l10n_display' => 'defaultAsReadonly',
334 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.duration',
335 'config' => array(
336 'type' => 'input',
337 'size' => '10',
338 'max' => '20',
339 'eval' => 'int',
340 'default' => '0'
341 )
342 ),
343 'color_space' => array(
344 'exclude' => 1,
345 'l10n_mode' => 'exclude',
346 'l10n_display' => 'defaultAsReadonly',
347 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.color_space',
348 'config' => array(
349 'type' => 'select',
350 'items' => array(
351 array('', ''),
352 array('RGB', 'RGB'),
353 array('CMYK', 'CMYK'),
354 array('CMY', 'CMY'),
355 array('YUV', 'YUV'),
356 array('Grey', 'grey'),
357 array('indexed', 'indx'),
358 ),
359 'default' => '',
360 'readOnly' => TRUE,
361 )
362 ),
363 'width' => array(
364 'exclude' => 1,
365 'l10n_mode' => 'exclude',
366 'l10n_display' => 'defaultAsReadonly',
367 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.width',
368 'config' => array(
369 'type' => 'input',
370 'size' => '10',
371 'max' => '20',
372 'eval' => 'int',
373 'default' => '0',
374 'readOnly' => TRUE,
375 ),
376 ),
377 'height' => array(
378 'exclude' => 1,
379 'l10n_mode' => 'exclude',
380 'l10n_display' => 'defaultAsReadonly',
381 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.height',
382 'config' => array(
383 'type' => 'input',
384 'size' => '10',
385 'max' => '20',
386 'eval' => 'int',
387 'default' => '0',
388 'readOnly' => TRUE,
389 ),
390 ),
391 'pages' => array(
392 'exclude' => 1,
393 'l10n_mode' => 'exclude',
394 'l10n_display' => 'defaultAsReadonly',
395 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.pages',
396 'config' => array(
397 'type' => 'input',
398 'size' => 30,
399 'eval' => 'trim',
400 'readOnly' => TRUE
401 ),
402 ),
403 'language' => array(
404 'exclude' => 1,
405 'l10n_mode' => 'exclude',
406 'l10n_display' => 'defaultAsReadonly',
407 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.language',
408 'config' => array(
409 'type' => 'input',
410 'size' => 30,
411 'eval' => 'trim'
412 )
413 ),
414 'fe_groups' => array(
415 'exclude' => 1,
416 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.fe_group',
417 'config' => array(
418 'type' => 'select',
419 'size' => 5,
420 'maxitems' => 20,
421 'items' => array(
422 array(
423 'LLL:EXT:lang/locallang_general.xlf:LGL.hide_at_login',
424 -1
425 ),
426 array(
427 'LLL:EXT:lang/locallang_general.xlf:LGL.any_login',
428 -2
429 ),
430 array(
431 'LLL:EXT:lang/locallang_general.xlf:LGL.usergroups',
432 '--div--'
433 )
434 ),
435 'exclusiveKeys' => '-1,-2',
436 'foreign_table' => 'fe_groups',
437 'foreign_table_where' => 'ORDER BY fe_groups.title'
438 )
439 ),
440 ),
441 );
442
443 $GLOBALS['TCA']['sys_file_metadata'] = array_replace_recursive($GLOBALS['TCA']['sys_file_metadata'], $tca);
444
445 // Add category tab if categories column is present
446 if (isset($GLOBALS['TCA']['sys_file_metadata']['columns']['categories'])) {
447 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
448 'sys_file_metadata',
449 '--div--;LLL:EXT:lang/locallang_tca.xlf:sys_category.tabs.category,categories'
450 );
451 }