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