[TASK] Cleanup TCA select field configuration
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Configuration / TCA / sys_file_metadata.php
1 <?php
2 return array(
3 'ctrl' => array(
4 'title' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_metadata',
5 'label' => 'file',
6 'tstamp' => 'tstamp',
7 'crdate' => 'crdate',
8 'cruser_id' => 'cruser_id',
9 'type' => 'file:type',
10 'hideTable' => TRUE,
11 'rootLevel' => TRUE,
12 'languageField' => 'sys_language_uid',
13 'transOrigPointerField' => 'l10n_parent',
14 'transOrigDiffSourceField' => 'l10n_diffsource',
15 'versioningWS' => TRUE,
16 'origUid' => 't3_origuid',
17 'default_sortby' => 'ORDER BY crdate DESC',
18 'typeicon_classes' => array(
19 'default' => 'mimetypes-other-other'
20 ),
21 'security' => array(
22 'ignoreWebMountRestriction' => TRUE,
23 'ignoreRootLevelRestriction' => TRUE,
24 ),
25 'searchFields' => 'file,title,description,alternative'
26 ),
27 'interface' => array(
28 'showRecordFieldList' => 'file, title, description, alternative'
29 ),
30 'columns' => array(
31 'sys_language_uid' => array(
32 'exclude' => 0,
33 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language',
34 'config' => array(
35 'type' => 'select',
36 'renderType' => 'selectSingle',
37 'foreign_table' => 'sys_language',
38 'foreign_table_where' => 'ORDER BY sys_language.title',
39 'items' => array(
40 array('LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1),
41 array('LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0)
42 ),
43 'default' => 0
44 )
45 ),
46 'l10n_parent' => array(
47 'displayCond' => 'FIELD:sys_language_uid:>:0',
48 'exclude' => 0,
49 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent',
50 'config' => array(
51 'type' => 'select',
52 'renderType' => 'selectSingle',
53 'items' => array(
54 array('', 0)
55 ),
56 'foreign_table' => 'sys_file_metadata',
57 'foreign_table_where' => 'AND sys_file_metadata.uid=###REC_FIELD_l10n_parent### AND sys_file_metadata.sys_language_uid IN (-1,0)',
58 'default' => 0
59 )
60 ),
61 'l10n_diffsource' => array(
62 'exclude' => 0,
63 'config' => array(
64 'type' => 'passthrough',
65 'default' => ''
66 )
67 ),
68 't3ver_label' => array(
69 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel',
70 'config' => array(
71 'type' => 'input',
72 'size' => '30',
73 'max' => '30'
74 )
75 ),
76 'fileinfo' => array(
77 'config' => array(
78 'type' => 'user',
79 'userFunc' => 'typo3/sysext/core/Classes/Resource/Hook/FileInfoHook.php:TYPO3\CMS\Core\Resource\Hook\FileInfoHook->renderFileMetadataInfo'
80 )
81 ),
82 'file' => array(
83 'displayCond' => 'FIELD:sys_language_uid:=:0',
84 'exclude' => 0,
85 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file',
86 'config' => array(
87 'readOnly' => 1,
88 'type' => 'select',
89 'renderType' => 'selectSingle',
90 'foreign_table' => 'sys_file',
91 'minitems' => 1,
92 'maxitems' => 1,
93 'size' => 1,
94 'default' => 0,
95 )
96 ),
97 'title' => array(
98 'exclude' => 1,
99 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file.title',
100 'l10n_mode' => 'prefixLangTitle',
101 'config' => array(
102 'type' => 'input',
103 'size' => '30',
104 'placeholder' => '__row|file|name'
105 )
106 ),
107 'description' => array(
108 'exclude' => 0,
109 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file.description',
110 'l10n_mode' => 'prefixLangTitle',
111 'config' => array(
112 'type' => 'text',
113 'cols' => '40',
114 'rows' => '3'
115 )
116 ),
117 'alternative' => array(
118 'exclude' => 0,
119 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file.alternative',
120 'config' => array(
121 'type' => 'text',
122 'cols' => '40',
123 'rows' => '3'
124 )
125 ),
126 'width' => array(
127 'exclude' => 0,
128 'l10n_mode' => 'exclude'
129 ),
130 'height' => array(
131 'exclude' => 0,
132 'l10n_mode' => 'exclude'
133 )
134 ),
135 'types' => array(
136 '1' => array('showitem' => 'fileinfo, title, description, alternative')
137 ),
138 'palettes' => array()
139 );