[BUGFIX] Correctly reference sys_file_metadata.language in TCA
[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 = [
5 'ctrl' => [
6 'type' => 'file:type',
7 ],
8 'types' => [
9 TYPO3\CMS\Core\Resource\File::FILETYPE_UNKNOWN => [
10 'showitem' => '
11 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
12 fileinfo, title, description, ranking, keywords,
13 --palette--;;25,
14 --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
15 creator, creator_tool, publisher, source, copyright,
16 --palette--;;40,
17 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,
18 language,
19 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,
20 --palette--;;10,
21 fe_groups,
22 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:categories,
23 categories,
24 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:extended,
25 ',
26 ],
27 TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
28 'showitem' => '
29 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
30 fileinfo, title, description, ranking, keywords,
31 --palette--;;25,
32 --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
33 creator, creator_tool, publisher, source, copyright, language,
34 --palette--;;40,
35 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,
36 language,
37 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,
38 --palette--;;10,
39 fe_groups,
40 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:categories,
41 categories,
42 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:extended,
43 ',
44 ],
45 TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
46 'showitem' => '
47 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
48 fileinfo, title, description, ranking, keywords,
49 --palette--;;20,
50 --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
51 creator, creator_tool, publisher, source, copyright, language,
52 --palette--;;40,
53 --palette--;;30,
54 --palette--;;60,
55 --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.camera,
56 color_space,
57 --palette--;;50,
58 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,
59 language,
60 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,
61 --palette--;;10,
62 fe_groups,
63 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:categories,
64 categories,
65 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:extended,
66 ',
67 ],
68 TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
69 'showitem' => '
70 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
71 fileinfo, title, description, ranking, keywords,
72 --palette--;;25,
73 --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
74 creator, creator_tool, publisher, source, copyright, language,
75 --palette--;;60,
76 --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.audio,
77 duration,
78 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,
79 language,
80 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,
81 --palette--;;10,
82 fe_groups,
83 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:categories,
84 categories,
85 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:extended,
86 ',
87 ],
88 TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
89 'showitem' => '
90 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
91 fileinfo, title, description, ranking, keywords,
92 --palette--;;25,
93 --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
94 creator, creator_tool, publisher, source, copyright, language,
95 --palette--;;60,
96 --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.video,
97 duration,
98 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,
99 language,
100 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,
101 --palette--;;10,
102 fe_groups,
103 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:categories,
104 categories,
105 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:extended,
106 ',
107 ],
108 TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
109 'showitem' => '
110 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
111 fileinfo, title, description, ranking, keywords,
112 --palette--;;25,
113 --div--;LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:tabs.metadata,
114 creator, creator_tool, publisher, source, copyright, language,
115 --palette--;;40,
116 pages,
117 --palette--;;50,
118 --palette--;;60,
119 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,
120 language,
121 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,
122 --palette--;;10,
123 fe_groups,
124 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:categories,
125 categories,
126 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:extended,
127 ',
128 ],
129 ],
130 'palettes' => [
131 '10' => [
132 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.visibility',
133 'showitem' => 'visible, status',
134 ],
135 '20' => [
136 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.accessibility',
137 'showitem' => 'alternative, --linebreak--, caption, --linebreak--, download_name',
138 ],
139 '25' => [
140 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.accessibility',
141 'showitem' => 'caption, --linebreak--, download_name',
142 ],
143 '30' => [
144 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.gps',
145 'showitem' => 'latitude, longitude',
146 ],
147 '40' => [
148 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.geo_location',
149 'showitem' => 'location_country, location_region, location_city',
150 ],
151 '50' => [
152 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.metrics',
153 'showitem' => 'width, height, unit',
154 ],
155 '60' => [
156 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:palette.content_date',
157 'showitem' => 'content_creation_date, content_modification_date',
158 ],
159 ],
160 'columns' => [
161 'visible' => [
162 'exclude' => true,
163 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.visible',
164 'config' => [
165 'type' => 'check',
166 'default' => '1'
167 ],
168 ],
169 'status' => [
170 'exclude' => true,
171 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.status',
172 'config' => [
173 'type' => 'select',
174 'renderType' => 'selectSingle',
175 'items' => [
176 [
177 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.status.1',
178 1,
179 'filemetadata-status-1'
180 ],
181 [
182 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.status.2',
183 2,
184 'filemetadata-status-2'
185 ],
186 [
187 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.status.3',
188 3,
189 'filemetadata-status-3'
190 ],
191 ],
192 'fieldWizard' => [
193 'selectIcons' => [
194 'disabled' => false,
195 ],
196 ],
197 ],
198 ],
199 'keywords' => [
200 'exclude' => true,
201 'l10n_mode' => 'prefixLangTitle',
202 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.keywords',
203 'config' => [
204 'type' => 'text',
205 'cols' => 40,
206 'rows' => 3,
207 'placeholder' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:placeholder.keywords'
208 ],
209 ],
210 'caption' => [
211 'exclude' => true,
212 'l10n_mode' => 'prefixLangTitle',
213 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.caption',
214 'config' => [
215 'type' => 'text',
216 'cols' => 40,
217 'rows' => 3,
218 ],
219 ],
220 'creator_tool' => [
221 'exclude' => true,
222 'l10n_mode' => 'exclude',
223 'l10n_display' => 'defaultAsReadonly',
224 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.creator_tool',
225 'config' => [
226 'type' => 'input',
227 'size' => 20,
228 'eval' => 'trim'
229 ],
230 ],
231 'download_name' => [
232 'exclude' => true,
233 'l10n_mode' => 'exclude',
234 'l10n_display' => 'defaultAsReadonly',
235 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.download_name',
236 'config' => [
237 'type' => 'input',
238 'size' => 30,
239 'eval' => 'trim'
240 ],
241 ],
242 'creator' => [
243 'exclude' => true,
244 'l10n_mode' => 'exclude',
245 'l10n_display' => 'defaultAsReadonly',
246 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.creator',
247 'config' => [
248 'type' => 'input',
249 'size' => 30,
250 'eval' => 'trim'
251 ],
252 ],
253 'publisher' => [
254 'exclude' => true,
255 'l10n_mode' => 'exclude',
256 'l10n_display' => 'defaultAsReadonly',
257 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.publisher',
258 'config' => [
259 'type' => 'input',
260 'size' => 20,
261 'eval' => 'trim'
262 ],
263 ],
264 'source' => [
265 'exclude' => true,
266 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.source',
267 'config' => [
268 'type' => 'input',
269 'size' => 20,
270 'eval' => 'trim'
271 ],
272 ],
273 'copyright' => [
274 'exclude' => true,
275 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.copyright',
276 'config' => [
277 'type' => 'text',
278 'cols' => 40,
279 'rows' => 3,
280 ],
281 ],
282 'location_country' => [
283 'exclude' => true,
284 'l10n_display' => '',
285 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.location_country',
286 'config' => [
287 'type' => 'input',
288 'size' => 20,
289 'eval' => 'trim',
290 'behaviour' => [
291 'allowLanguageSynchronization' => true,
292 ]
293 ],
294 ],
295 'location_region' => [
296 'exclude' => true,
297 'l10n_display' => '',
298 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.location_region',
299 'config' => [
300 'type' => 'input',
301 'size' => 20,
302 'eval' => 'trim',
303 'behaviour' => [
304 'allowLanguageSynchronization' => true,
305 ]
306 ],
307 ],
308 'location_city' => [
309 'exclude' => true,
310 'l10n_display' => '',
311 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.location_city',
312 'config' => [
313 'type' => 'input',
314 'size' => 20,
315 'eval' => 'trim',
316 'behaviour' => [
317 'allowLanguageSynchronization' => true,
318 ]
319 ],
320 ],
321 'latitude' => [
322 'exclude' => true,
323 'l10n_mode' => 'exclude',
324 'l10n_display' => 'defaultAsReadonly',
325 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.latitude',
326 'config' => [
327 'type' => 'input',
328 'size' => 20,
329 'eval' => 'trim',
330 'max' => 30,
331 'default' => '0.00000000000000'
332 ],
333 ],
334 'longitude' => [
335 'exclude' => true,
336 'l10n_mode' => 'exclude',
337 'l10n_display' => 'defaultAsReadonly',
338 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.longitude',
339 'config' => [
340 'type' => 'input',
341 'size' => 20,
342 'eval' => 'trim',
343 'max' => 30,
344 'default' => '0.00000000000000'
345 ],
346 ],
347 'ranking' => [
348 'exclude' => true,
349 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.ranking',
350 'config' => [
351 'type' => 'select',
352 'renderType' => 'selectSingle',
353 'minitems' => 1,
354 'maxitems' => 1,
355 'items' => [
356 [0, 0],
357 [1, 1],
358 [2, 2],
359 [3, 3],
360 [4, 4],
361 [5, 5],
362 ],
363 ],
364 ],
365 'content_creation_date' => [
366 'exclude' => true,
367 'l10n_mode' => 'exclude',
368 'l10n_display' => 'defaultAsReadonly',
369 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.content_creation_date',
370 'config' => [
371 'type' => 'input',
372 'renderType' => 'inputDateTime',
373 'eval' => 'date,int',
374 'default' => time()
375 ],
376 ],
377 'content_modification_date' => [
378 'exclude' => true,
379 'l10n_mode' => 'exclude',
380 'l10n_display' => 'defaultAsReadonly',
381 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.content_modification_date',
382 'config' => [
383 'type' => 'input',
384 'renderType' => 'inputDateTime',
385 'eval' => 'date,int',
386 'default' => time()
387 ],
388 ],
389 'note' => [
390 'exclude' => true,
391 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.note',
392 'config' => [
393 'type' => 'text',
394 'cols' => 40,
395 'rows' => 15,
396 'eval' => 'trim'
397 ],
398 ],
399 /*
400 * METRICS ###########################################
401 */
402 'unit' => [
403 'exclude' => true,
404 'l10n_mode' => 'exclude',
405 'l10n_display' => 'defaultAsReadonly',
406 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.unit',
407 'config' => [
408 'type' => 'select',
409 'renderType' => 'selectSingle',
410 'items' => [
411 ['', ''],
412 ['LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.unit.px', 'px'],
413 ['LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.unit.cm', 'cm'],
414 ['LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.unit.in', 'in'],
415 ['LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.unit.mm', 'mm'],
416 ['LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.unit.m', 'm'],
417 ['LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.unit.p', 'p'],
418 ['LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.unit.pt', 'pt']
419 ],
420 'default' => '',
421 'readOnly' => true,
422 ],
423 ],
424 'duration' => [
425 'exclude' => true,
426 'l10n_mode' => 'exclude',
427 'l10n_display' => 'defaultAsReadonly',
428 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.duration',
429 'config' => [
430 'type' => 'input',
431 'size' => 10,
432 'max' => 20,
433 'eval' => 'int',
434 'default' => 0
435 ]
436 ],
437 'color_space' => [
438 'exclude' => true,
439 'l10n_mode' => 'exclude',
440 'l10n_display' => 'defaultAsReadonly',
441 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.color_space',
442 'config' => [
443 'type' => 'select',
444 'renderType' => 'selectSingle',
445 'items' => [
446 ['', ''],
447 ['LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.color_space.RGB', 'RGB'],
448 ['LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.color_space.sRGB', 'sRGB'],
449 ['LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.color_space.CMYK', 'CMYK'],
450 ['LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.color_space.CMY', 'CMY'],
451 ['LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.color_space.YUV', 'YUV'],
452 ['LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.color_space.grey', 'grey'],
453 ['LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.color_space.indx', 'indx'],
454 ],
455 'default' => '',
456 'readOnly' => true,
457 ]
458 ],
459 'width' => [
460 'exclude' => true,
461 'l10n_mode' => 'exclude',
462 'l10n_display' => 'defaultAsReadonly',
463 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.width',
464 'config' => [
465 'type' => 'input',
466 'size' => 10,
467 'max' => 20,
468 'eval' => 'int',
469 'default' => 0,
470 'readOnly' => true,
471 ],
472 ],
473 'height' => [
474 'exclude' => true,
475 'l10n_mode' => 'exclude',
476 'l10n_display' => 'defaultAsReadonly',
477 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.height',
478 'config' => [
479 'type' => 'input',
480 'size' => 10,
481 'max' => 20,
482 'eval' => 'int',
483 'default' => 0,
484 'readOnly' => true,
485 ],
486 ],
487 'pages' => [
488 'exclude' => true,
489 'l10n_mode' => 'exclude',
490 'l10n_display' => 'defaultAsReadonly',
491 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.pages',
492 'config' => [
493 'type' => 'input',
494 'size' => 30,
495 'eval' => 'trim',
496 'readOnly' => true
497 ],
498 ],
499 'language' => [
500 'exclude' => true,
501 'l10n_mode' => 'exclude',
502 'l10n_display' => 'defaultAsReadonly',
503 'label' => 'LLL:EXT:filemetadata/Resources/Private/Language/locallang_tca.xlf:sys_file_metadata.language',
504 'config' => [
505 'type' => 'input',
506 'size' => 30,
507 'eval' => 'trim'
508 ]
509 ],
510 'fe_groups' => [
511 'exclude' => true,
512 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.fe_group',
513 'config' => [
514 'type' => 'select',
515 'renderType' => 'selectMultipleSideBySide',
516 'size' => 5,
517 'maxitems' => 20,
518 'items' => [
519 [
520 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.hide_at_login',
521 -1
522 ],
523 [
524 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.any_login',
525 -2
526 ],
527 [
528 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.usergroups',
529 '--div--'
530 ]
531 ],
532 'exclusiveKeys' => '-1,-2',
533 'foreign_table' => 'fe_groups',
534 'foreign_table_where' => 'ORDER BY fe_groups.title'
535 ]
536 ],
537 ],
538 ];
539
540 $GLOBALS['TCA']['sys_file_metadata'] = array_replace_recursive($GLOBALS['TCA']['sys_file_metadata'], $tca);