[TASK] Cleanup TCA select field configuration
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Configuration / TCA / sys_file_collection.php
1 <?php
2 return array(
3 'ctrl' => array(
4 'title' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_collection',
5 'label' => 'title',
6 'tstamp' => 'tstamp',
7 'crdate' => 'crdate',
8 'cruser_id' => 'cruser_id',
9 'versioningWS' => TRUE,
10 'origUid' => 't3_origuid',
11 'languageField' => 'sys_language_uid',
12 'transOrigPointerField' => 'l10n_parent',
13 'transOrigDiffSourceField' => 'l10n_diffsource',
14 'default_sortby' => 'ORDER BY crdate',
15 'delete' => 'deleted',
16 'type' => 'type',
17 'typeicon_column' => 'type',
18 'typeicon_classes' => array(
19 'default' => 'apps-filetree-folder-media',
20 'static' => 'apps-clipboard-images',
21 'folder' => 'apps-filetree-folder-media'
22 ),
23 'requestUpdate' => 'storage',
24 'enablecolumns' => array(
25 'disabled' => 'hidden',
26 'starttime' => 'starttime',
27 'endtime' => 'endtime'
28 ),
29 'searchFields' => 'files,title'
30 ),
31 'interface' => array(
32 'showRecordFieldList' => 'sys_language_uid,l10n_parent,l10n_diffsource,hidden,starttime,endtime,files,title'
33 ),
34 'columns' => array(
35 't3ver_label' => array(
36 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel',
37 'config' => array(
38 'type' => 'input',
39 'size' => '30',
40 'max' => '30'
41 )
42 ),
43 'sys_language_uid' => array(
44 'exclude' => 1,
45 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language',
46 'config' => array(
47 'type' => 'select',
48 'renderType' => 'selectSingle',
49 'foreign_table' => 'sys_language',
50 'foreign_table_where' => 'ORDER BY sys_language.title',
51 'items' => array(
52 array('LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1),
53 array('LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0)
54 ),
55 'default' => 0
56 )
57 ),
58 'l10n_parent' => array(
59 'displayCond' => 'FIELD:sys_language_uid:>:0',
60 'exclude' => 1,
61 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent',
62 'config' => array(
63 'type' => 'select',
64 'renderType' => 'selectSingle',
65 'items' => array(
66 array('', 0)
67 ),
68 'foreign_table' => 'sys_file_collection',
69 'foreign_table_where' => 'AND sys_file_collection.pid=###CURRENT_PID### AND sys_file_collection.sys_language_uid IN (-1,0)'
70 )
71 ),
72 'l10n_diffsource' => array(
73 'config' => array(
74 'type' => 'passthrough',
75 'default' => ''
76 )
77 ),
78 'hidden' => array(
79 'exclude' => 1,
80 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden',
81 'config' => array(
82 'type' => 'check',
83 'default' => '0'
84 )
85 ),
86 'starttime' => array(
87 'exclude' => 1,
88 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.starttime',
89 'config' => array(
90 'type' => 'input',
91 'size' => '8',
92 'max' => '20',
93 'eval' => 'date',
94 'default' => '0',
95 'checkbox' => '0'
96 )
97 ),
98 'endtime' => array(
99 'exclude' => 1,
100 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.endtime',
101 'config' => array(
102 'type' => 'input',
103 'size' => '8',
104 'max' => '20',
105 'eval' => 'date',
106 'checkbox' => '0',
107 'default' => '0',
108 'range' => array(
109 'upper' => mktime(0, 0, 0, 1, 1, 2038),
110 )
111 )
112 ),
113 'type' => array(
114 'exclude' => 0,
115 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_collection.type',
116 'config' => array(
117 'type' => 'select',
118 'renderType' => 'selectSingle',
119 'items' => array(
120 array('LLL:EXT:lang/locallang_tca.xlf:sys_file_collection.type.0', 'static'),
121 array('LLL:EXT:lang/locallang_tca.xlf:sys_file_collection.type.1', 'folder'),
122 array('LLL:EXT:lang/locallang_tca.xlf:sys_file_collection.type.2', 'category')
123 )
124 )
125 ),
126 'files' => array(
127 'exclude' => 0,
128 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_collection.files',
129 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('files')
130 ),
131 'title' => array(
132 'exclude' => 0,
133 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_collection.title',
134 'config' => array(
135 'type' => 'input',
136 'size' => '30',
137 'eval' => 'required'
138 )
139 ),
140 'storage' => array(
141 'exclude' => 0,
142 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_collection.storage',
143 'config' => array(
144 'type' => 'select',
145 'renderType' => 'selectSingle',
146 'items' => array(
147 array('', 0)
148 ),
149 'foreign_table' => 'sys_file_storage',
150 'foreign_table_where' => 'ORDER BY sys_file_storage.name',
151 'size' => 1,
152 'minitems' => 0,
153 'maxitems' => 1
154 )
155 ),
156 'folder' => array(
157 'exclude' => 0,
158 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_collection.folder',
159 'config' => array(
160 'type' => 'select',
161 'renderType' => 'selectSingle',
162 'items' => array(),
163 'itemsProcFunc' => 'typo3/sysext/core/Classes/Resource/Service/UserFileMountService.php:TYPO3\CMS\Core\Resource\Service\UserFileMountService->renderTceformsSelectDropdown',
164 )
165 ),
166 'recursive' => array(
167 'exclude' => 0,
168 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_collection.recursive',
169 'config' => array(
170 'type' => 'check',
171 'default' => 0
172 )
173 ),
174 'category' => array(
175 'exclude' => 0,
176 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_collection.category',
177 'config' => array(
178 'minitems' => 0,
179 'maxitems' => 1,
180 'type' => 'select',
181 'renderType' => 'selectTree',
182 'foreign_table' => 'sys_category',
183 'foreign_table_where' => ' AND sys_category.sys_language_uid IN (-1,0) ORDER BY sys_category.sorting ASC',
184 'treeConfig' => array(
185 'parentField' => 'parent',
186 'appearance' => array(
187 'expandAll' => TRUE,
188 'showHeader' => TRUE,
189 )
190 )
191 )
192 )
193 ),
194 'types' => array(
195 '0' => array(
196 'showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, title, --palette--;;1, type, files',
197 ),
198 'static' => array(
199 'showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, title, --palette--;;1, type, files',
200 ),
201 'folder' => array(
202 'showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, title, --palette--;;1, type, storage, folder, recursive',
203 ),
204 'category' => array(
205 'showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, title, --palette--;;1, type, category',
206 ),
207 ),
208 'palettes' => array(
209 '1' => array(
210 'showitem' => 'hidden, starttime, endtime',
211 ),
212 ),
213 );