[BUGFIX] Remove range from sorting field
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Configuration / TCA / sys_file_reference.php
1 <?php
2 return [
3 'ctrl' => [
4 'title' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference',
5 'label' => 'uid_local',
6 'formattedLabel_userFunc' => 'TYPO3\\CMS\\Core\\Resource\\Service\\UserFileInlineLabelService->getInlineLabel',
7 'formattedLabel_userFunc_options' => [
8 'sys_file' => [
9 'title',
10 'name'
11 ]
12 ],
13 'tstamp' => 'tstamp',
14 'crdate' => 'crdate',
15 'cruser_id' => 'cruser_id',
16 'type' => 'uid_local:type',
17 'hideTable' => true,
18 'sortby' => 'sorting',
19 'delete' => 'deleted',
20 'versioningWS' => true,
21 'languageField' => 'sys_language_uid',
22 'transOrigPointerField' => 'l10n_parent',
23 'transOrigDiffSourceField' => 'l10n_diffsource',
24 'rootLevel' => -1,
25 // records can and should be edited in workspaces
26 'shadowColumnsForMovePlaceholders' => 'tablenames,fieldname,uid_local,table_local,uid_foreign',
27 'enablecolumns' => [
28 'disabled' => 'hidden'
29 ],
30 'typeicon_classes' => [
31 'default' => 'mimetypes-other-other'
32 ],
33 'security' => [
34 'ignoreWebMountRestriction' => true,
35 'ignoreRootLevelRestriction' => true,
36 ],
37 'searchFields' => 'uid_local,uid_foreign,tablenames,fieldname,title,description'
38 ],
39 'interface' => [
40 'showRecordFieldList' => 'hidden,uid_local,uid_foreign,tablenames,fieldname,sorting_foreign,table_local,title,description'
41 ],
42 'columns' => [
43 't3ver_label' => [
44 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel',
45 'config' => [
46 'type' => 'input',
47 'size' => 30,
48 'max' => 30
49 ]
50 ],
51 'sys_language_uid' => [
52 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.language',
53 'config' => [
54 'type' => 'select',
55 'renderType' => 'selectSingle',
56 'foreign_table' => 'sys_language',
57 'foreign_table_where' => 'ORDER BY sys_language.title',
58 'items' => [
59 ['LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1],
60 ['LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0]
61 ],
62 'default' => 0,
63 'showIconTable' => true,
64 ]
65 ],
66 'l10n_parent' => [
67 'displayCond' => 'FIELD:sys_language_uid:>:0',
68 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
69 'config' => [
70 'type' => 'select',
71 'renderType' => 'selectSingle',
72 'items' => [
73 ['', 0]
74 ],
75 'foreign_table' => 'sys_file_reference',
76 'foreign_table_where' => 'AND sys_file_reference.uid=###REC_FIELD_l10n_parent### AND sys_file_reference.sys_language_uid IN (-1,0)',
77 'default' => 0
78 ]
79 ],
80 'l10n_diffsource' => [
81 'config' => [
82 'type' => 'passthrough',
83 'default' => ''
84 ]
85 ],
86 'hidden' => [
87 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.hidden',
88 'config' => [
89 'type' => 'check',
90 'default' => 0
91 ]
92 ],
93 'uid_local' => [
94 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.uid_local',
95 'config' => [
96 'type' => 'group',
97 'internal_type' => 'db',
98 'size' => 1,
99 'eval' => 'int',
100 'maxitems' => 1,
101 'minitems' => 0,
102 'allowed' => 'sys_file'
103 ]
104 ],
105 'uid_foreign' => [
106 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.uid_foreign',
107 'config' => [
108 'type' => 'input',
109 'size' => 10,
110 'eval' => 'int'
111 ]
112 ],
113 'tablenames' => [
114 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.tablenames',
115 'config' => [
116 'type' => 'input',
117 'size' => 30,
118 'eval' => 'trim'
119 ]
120 ],
121 'fieldname' => [
122 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.fieldname',
123 'config' => [
124 'type' => 'input',
125 'size' => 30
126 ]
127 ],
128 'sorting_foreign' => [
129 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.sorting_foreign',
130 'config' => [
131 'type' => 'input',
132 'size' => 4,
133 'max' => 4,
134 'eval' => 'int',
135 'default' => 0
136 ]
137 ],
138 'table_local' => [
139 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.table_local',
140 'config' => [
141 'type' => 'input',
142 'size' => 20,
143 'default' => 'sys_file'
144 ]
145 ],
146 'title' => [
147 'l10n_mode' => 'prefixLangTitle',
148 'exclude' => true,
149 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.title',
150 'config' => [
151 'type' => 'input',
152 'size' => 20,
153 'eval' => 'null',
154 'placeholder' => '__row|uid_local|metadata|title',
155 'mode' => 'useOrOverridePlaceholder',
156 'default' => null,
157 ]
158 ],
159 'link' => [
160 'exclude' => true,
161 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.link',
162 'config' => [
163 'type' => 'input',
164 'size' => 20,
165 'max' => 1024,
166 'wizards' => [
167 'link' => [
168 'type' => 'popup',
169 'title' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.link',
170 'icon' => 'actions-wizard-link',
171 'module' => [
172 'name' => 'wizard_link',
173 ],
174 'JSopenParams' => 'width=800,height=600,status=0,menubar=0,scrollbars=1'
175 ]
176 ],
177 'softref' => 'typolink'
178 ]
179 ],
180 'description' => [
181 // This is used for captions in the frontend
182 'l10n_mode' => 'prefixLangTitle',
183 'exclude' => true,
184 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.description',
185 'config' => [
186 'type' => 'text',
187 'cols' => 20,
188 'rows' => 5,
189 'eval' => 'null',
190 'placeholder' => '__row|uid_local|metadata|description',
191 'mode' => 'useOrOverridePlaceholder',
192 'default' => null,
193 ]
194 ],
195 'alternative' => [
196 'l10n_mode' => 'prefixLangTitle',
197 'exclude' => true,
198 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.alternative',
199 'config' => [
200 'type' => 'input',
201 'size' => 20,
202 'eval' => 'null',
203 'placeholder' => '__row|uid_local|metadata|alternative',
204 'mode' => 'useOrOverridePlaceholder',
205 'default' => null,
206 ],
207 ],
208 'crop' => [
209 'exclude' => true,
210 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.crop',
211 'config' => [
212 'type' => 'imageManipulation'
213 ]
214 ],
215 'autoplay' => [
216 'exclude' => true,
217 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.autoplay',
218 'config' => [
219 'type' => 'check',
220 'default' => 0
221 ]
222 ],
223 ],
224 'types' => [
225 // Note that at the moment we define the same fields for every media type.
226 // We leave the extensive definition of each type here anyway, to make clear that you can use it to differentiate between the types.
227 '0' => [
228 'showitem' => '
229 --palette--;LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
230 --palette--;;filePalette'
231 ],
232 \TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
233 'showitem' => '
234 --palette--;LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
235 --palette--;;filePalette'
236 ],
237 \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
238 'showitem' => '
239 --palette--;LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
240 --palette--;;filePalette'
241 ],
242 \TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
243 'showitem' => '
244 --palette--;LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
245 --palette--;;filePalette'
246 ],
247 \TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
248 'showitem' => '
249 --palette--;LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
250 --palette--;;filePalette'
251 ],
252 \TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
253 'showitem' => '
254 --palette--;LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
255 --palette--;;filePalette'
256 ]
257 ],
258 'palettes' => [
259 // Used for basic overlays: having a filelist etc
260 'basicoverlayPalette' => [
261 'showitem' => 'title,description',
262 ],
263 // Used for everything that is an image (because it has a link and an alternative text)
264 'imageoverlayPalette' => [
265 'showitem' => '
266 title,alternative,--linebreak--,
267 link,description,--linebreak--,crop
268 ',
269 ],
270 // Used for everything that is a video
271 'videoOverlayPalette' => [
272 'showitem' => '
273 title,description,--linebreak--,autoplay
274 ',
275 ],
276 // Used for everything that is a audio file
277 'audioOverlayPalette' => [
278 'showitem' => '
279 title,description,--linebreak--,autoplay
280 ',
281 ],
282 // File palette, hidden but needs to be included all the time
283 'filePalette' => [
284 'showitem' => 'uid_local, hidden, sys_language_uid, l10n_parent',
285 'isHiddenPalette' => true,
286 ],
287 ],
288 ];