[!!!][FEATURE] FormEngine element level refactoring
[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 'fieldWizard' => [
64 'selectIcons' => [
65 'disabled' => false,
66 ],
67 ],
68 ]
69 ],
70 'l10n_parent' => [
71 'displayCond' => 'FIELD:sys_language_uid:>:0',
72 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
73 'config' => [
74 'type' => 'select',
75 'renderType' => 'selectSingle',
76 'items' => [
77 ['', 0]
78 ],
79 'foreign_table' => 'sys_file_reference',
80 'foreign_table_where' => 'AND sys_file_reference.uid=###REC_FIELD_l10n_parent### AND sys_file_reference.sys_language_uid IN (-1,0)',
81 'default' => 0
82 ]
83 ],
84 'l10n_diffsource' => [
85 'config' => [
86 'type' => 'passthrough',
87 'default' => ''
88 ]
89 ],
90 'hidden' => [
91 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.hidden',
92 'config' => [
93 'type' => 'check',
94 'default' => 0
95 ]
96 ],
97 'uid_local' => [
98 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.uid_local',
99 'config' => [
100 'type' => 'group',
101 'internal_type' => 'db',
102 'size' => 1,
103 'eval' => 'int',
104 'maxitems' => 1,
105 'minitems' => 0,
106 'allowed' => 'sys_file',
107 'hideSuggest' => true,
108 ]
109 ],
110 'uid_foreign' => [
111 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.uid_foreign',
112 'config' => [
113 'type' => 'input',
114 'size' => 10,
115 'eval' => 'int'
116 ]
117 ],
118 'tablenames' => [
119 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.tablenames',
120 'config' => [
121 'type' => 'input',
122 'size' => 30,
123 'eval' => 'trim'
124 ]
125 ],
126 'fieldname' => [
127 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.fieldname',
128 'config' => [
129 'type' => 'input',
130 'size' => 30
131 ]
132 ],
133 'sorting_foreign' => [
134 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.sorting_foreign',
135 'config' => [
136 'type' => 'input',
137 'size' => 4,
138 'max' => 4,
139 'eval' => 'int',
140 'default' => 0
141 ]
142 ],
143 'table_local' => [
144 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.table_local',
145 'config' => [
146 'type' => 'input',
147 'size' => 20,
148 'default' => 'sys_file'
149 ]
150 ],
151 'title' => [
152 'l10n_mode' => 'prefixLangTitle',
153 'exclude' => true,
154 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.title',
155 'config' => [
156 'type' => 'input',
157 'size' => 20,
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:lang/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:lang/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:lang/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:lang/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:lang/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:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.autoplay',
220 'config' => [
221 'type' => 'check',
222 'default' => 0
223 ]
224 ],
225 ],
226 'types' => [
227 // Note that at the moment we define the same fields for every media type.
228 // We leave the extensive definition of each type here anyway, to make clear that you can use it to differentiate between the types.
229 '0' => [
230 'showitem' => '
231 --palette--;LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
232 --palette--;;filePalette'
233 ],
234 \TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
235 'showitem' => '
236 --palette--;LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
237 --palette--;;filePalette'
238 ],
239 \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
240 'showitem' => '
241 --palette--;LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
242 --palette--;;filePalette'
243 ],
244 \TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
245 'showitem' => '
246 --palette--;LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
247 --palette--;;filePalette'
248 ],
249 \TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
250 'showitem' => '
251 --palette--;LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
252 --palette--;;filePalette'
253 ],
254 \TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
255 'showitem' => '
256 --palette--;LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
257 --palette--;;filePalette'
258 ]
259 ],
260 'palettes' => [
261 // Used for basic overlays: having a filelist etc
262 '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 'showitem' => '
268 title,alternative,--linebreak--,
269 link,description,--linebreak--,crop
270 ',
271 ],
272 // Used for everything that is a video
273 'videoOverlayPalette' => [
274 'showitem' => '
275 title,description,--linebreak--,autoplay
276 ',
277 ],
278 // Used for everything that is a audio file
279 'audioOverlayPalette' => [
280 'showitem' => '
281 title,description,--linebreak--,autoplay
282 ',
283 ],
284 // File palette, hidden but needs to be included all the time
285 'filePalette' => [
286 'showitem' => 'uid_local, hidden, sys_language_uid, l10n_parent',
287 'isHiddenPalette' => true,
288 ],
289 ],
290 ];