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