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