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