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