[!!!][FEATURE] Add showIconTable option for selectSingle fields
[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 'showIconTable' => true,
57 )
58 ),
59 'l10n_parent' => array(
60 'displayCond' => 'FIELD:sys_language_uid:>:0',
61 'exclude' => 1,
62 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent',
63 'config' => array(
64 'type' => 'select',
65 'renderType' => 'selectSingle',
66 'items' => array(
67 array('', 0)
68 ),
69 'foreign_table' => 'sys_file_collection',
70 'foreign_table_where' => 'AND sys_file_collection.pid=###CURRENT_PID### AND sys_file_collection.sys_language_uid IN (-1,0)'
71 )
72 ),
73 'l10n_diffsource' => array(
74 'config' => array(
75 'type' => 'passthrough',
76 'default' => ''
77 )
78 ),
79 'hidden' => array(
80 'exclude' => 1,
81 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden',
82 'config' => array(
83 'type' => 'check',
84 'default' => '0'
85 )
86 ),
87 'starttime' => array(
88 'exclude' => 1,
89 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.starttime',
90 'config' => array(
91 'type' => 'input',
92 'size' => '8',
93 'max' => '20',
94 'eval' => 'date',
95 'default' => '0',
96 'checkbox' => '0'
97 )
98 ),
99 'endtime' => array(
100 'exclude' => 1,
101 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.endtime',
102 'config' => array(
103 'type' => 'input',
104 'size' => '8',
105 'max' => '20',
106 'eval' => 'date',
107 'checkbox' => '0',
108 'default' => '0',
109 'range' => array(
110 'upper' => mktime(0, 0, 0, 1, 1, 2038),
111 )
112 )
113 ),
114 'type' => array(
115 'exclude' => 0,
116 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_collection.type',
117 'config' => array(
118 'type' => 'select',
119 'renderType' => 'selectSingle',
120 'items' => array(
121 array('LLL:EXT:lang/locallang_tca.xlf:sys_file_collection.type.0', 'static'),
122 array('LLL:EXT:lang/locallang_tca.xlf:sys_file_collection.type.1', 'folder'),
123 array('LLL:EXT:lang/locallang_tca.xlf:sys_file_collection.type.2', 'category')
124 )
125 )
126 ),
127 'files' => array(
128 'exclude' => 0,
129 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_collection.files',
130 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('files')
131 ),
132 'title' => array(
133 'exclude' => 0,
134 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_collection.title',
135 'config' => array(
136 'type' => 'input',
137 'size' => '30',
138 'eval' => 'required'
139 )
140 ),
141 'storage' => array(
142 'exclude' => 0,
143 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_collection.storage',
144 'config' => array(
145 'type' => 'select',
146 'renderType' => 'selectSingle',
147 'items' => array(
148 array('', 0)
149 ),
150 'foreign_table' => 'sys_file_storage',
151 'foreign_table_where' => 'ORDER BY sys_file_storage.name',
152 'size' => 1,
153 'minitems' => 0,
154 'maxitems' => 1
155 )
156 ),
157 'folder' => array(
158 'exclude' => 0,
159 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_collection.folder',
160 'config' => array(
161 'type' => 'select',
162 'renderType' => 'selectSingle',
163 'items' => array(),
164 'itemsProcFunc' => 'typo3/sysext/core/Classes/Resource/Service/UserFileMountService.php:TYPO3\CMS\Core\Resource\Service\UserFileMountService->renderTceformsSelectDropdown',
165 )
166 ),
167 'recursive' => array(
168 'exclude' => 0,
169 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_collection.recursive',
170 'config' => array(
171 'type' => 'check',
172 'default' => 0
173 )
174 ),
175 'category' => array(
176 'exclude' => 0,
177 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_collection.category',
178 'config' => array(
179 'minitems' => 0,
180 'maxitems' => 1,
181 'type' => 'select',
182 'renderType' => 'selectTree',
183 'foreign_table' => 'sys_category',
184 'foreign_table_where' => ' AND sys_category.sys_language_uid IN (-1,0) ORDER BY sys_category.sorting ASC',
185 'treeConfig' => array(
186 'parentField' => 'parent',
187 'appearance' => array(
188 'expandAll' => true,
189 'showHeader' => true,
190 )
191 )
192 )
193 )
194 ),
195 'types' => array(
196 '0' => array(
197 'showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, title, --palette--;;1, type, files',
198 ),
199 'static' => array(
200 'showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, title, --palette--;;1, type, files',
201 ),
202 'folder' => array(
203 'showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, title, --palette--;;1, type, storage, folder, recursive',
204 ),
205 'category' => array(
206 'showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, title, --palette--;;1, type, category',
207 ),
208 ),
209 'palettes' => array(
210 '1' => array(
211 'showitem' => 'hidden, starttime, endtime',
212 ),
213 ),
214 );