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