f748031b2778b8ff067e2678673aefa6df9d6322
[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_local',
6 'formattedLabel_userFunc' => '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 'shadowColumnsForMovePlaceholders' => 'tablenames,fieldname,uid_local,table_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 'eval' => 'int',
106 'maxitems' => 1,
107 'minitems' => 0,
108 'allowed' => 'sys_file'
109 )
110 ),
111 'uid_foreign' => array(
112 'exclude' => 0,
113 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.uid_foreign',
114 'config' => array(
115 'type' => 'input',
116 'size' => '10',
117 'eval' => 'int'
118 )
119 ),
120 'tablenames' => array(
121 'exclude' => 0,
122 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.tablenames',
123 'config' => array(
124 'type' => 'input',
125 'size' => '30',
126 'eval' => 'trim'
127 )
128 ),
129 'fieldname' => array(
130 'exclude' => 0,
131 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.fieldname',
132 'config' => array(
133 'type' => 'input',
134 'size' => '30'
135 )
136 ),
137 'sorting_foreign' => array(
138 'exclude' => 0,
139 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.sorting_foreign',
140 'config' => array(
141 'type' => 'input',
142 'size' => '4',
143 'max' => '4',
144 'eval' => 'int',
145 'range' => array(
146 'upper' => '1000',
147 'lower' => '10'
148 ),
149 'default' => 0
150 )
151 ),
152 'table_local' => array(
153 'exclude' => 0,
154 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.table_local',
155 'config' => array(
156 'type' => 'input',
157 'size' => '20',
158 'default' => 'sys_file'
159 )
160 ),
161 'title' => array(
162 'l10n_mode' => 'prefixLangTitle',
163 'exclude' => 1,
164 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.title',
165 'config' => array(
166 'type' => 'input',
167 'size' => '20',
168 'eval' => 'null',
169 'placeholder' => '__row|uid_local|metadata|title',
170 'mode' => 'useOrOverridePlaceholder',
171 'default' => null,
172 )
173 ),
174 'link' => array(
175 'exclude' => 1,
176 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.link',
177 'config' => array(
178 'type' => 'input',
179 'size' => '20',
180 'max' => 1024,
181 'wizards' => array(
182 'link' => array(
183 'type' => 'popup',
184 'title' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.link',
185 'icon' => 'EXT:backend/Resources/Public/Images/FormFieldWizard/wizard_link.gif',
186 'module' => array(
187 'name' => 'wizard_link',
188 ),
189 'JSopenParams' => 'width=800,height=600,status=0,menubar=0,scrollbars=1'
190 )
191 ),
192 'softref' => 'typolink'
193 )
194 ),
195 'description' => array(
196 // This is used for captions in the frontend
197 'l10n_mode' => 'prefixLangTitle',
198 'exclude' => 1,
199 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.description',
200 'config' => array(
201 'type' => 'text',
202 'cols' => '20',
203 'rows' => '5',
204 'eval' => 'null',
205 'placeholder' => '__row|uid_local|metadata|description',
206 'mode' => 'useOrOverridePlaceholder',
207 'default' => null,
208 )
209 ),
210 'alternative' => array(
211 'l10n_mode' => 'prefixLangTitle',
212 'exclude' => 1,
213 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.alternative',
214 'config' => array(
215 'type' => 'input',
216 'size' => '20',
217 'eval' => 'null',
218 'placeholder' => '__row|uid_local|metadata|alternative',
219 'mode' => 'useOrOverridePlaceholder',
220 'default' => null,
221 ),
222 ),
223 'crop' => array(
224 'exclude' => 1,
225 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.crop',
226 'config' => array(
227 'type' => 'imageManipulation'
228 )
229 ),
230 'autoplay' => array(
231 'exclude' => 1,
232 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.autoplay',
233 'config' => array(
234 'type' => 'check',
235 'default' => 0
236 )
237 ),
238 ),
239 'types' => array(
240 // Note that at the moment we define the same fields for every media type.
241 // We leave the extensive definition of each type here anyway, to make clear that you can use it to differentiate between the types.
242 '0' => array(
243 'showitem' => '
244 --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
245 --palette--;;filePalette'
246 ),
247 \TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => array(
248 'showitem' => '
249 --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
250 --palette--;;filePalette'
251 ),
252 \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => array(
253 'showitem' => '
254 --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
255 --palette--;;filePalette'
256 ),
257 \TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => array(
258 'showitem' => '
259 --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
260 --palette--;;filePalette'
261 ),
262 \TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => array(
263 'showitem' => '
264 --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
265 --palette--;;filePalette'
266 ),
267 \TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => array(
268 'showitem' => '
269 --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
270 --palette--;;filePalette'
271 )
272 ),
273 'palettes' => array(
274 // Used for basic overlays: having a filelist etc
275 'basicoverlayPalette' => array(
276 'showitem' => 'title,description',
277 ),
278 // Used for everything that is an image (because it has a link and an alternative text)
279 'imageoverlayPalette' => array(
280 'showitem' => '
281 title,alternative,--linebreak--,
282 link,description,--linebreak--,crop
283 ',
284 ),
285 // Used for everything that is a video
286 'videoOverlayPalette' => array(
287 'showitem' => '
288 title,description,--linebreak--,autoplay
289 ',
290 ),
291 // Used for everything that is a audio file
292 'audioOverlayPalette' => array(
293 'showitem' => '
294 title,description,--linebreak--,autoplay
295 ',
296 ),
297 // File palette, hidden but needs to be included all the time
298 'filePalette' => array(
299 'showitem' => 'uid_local, hidden, sys_language_uid, l10n_parent',
300 'isHiddenPalette' => true,
301 ),
302 ),
303 );