2481c77480b281e6595d5023bb6af407c08bf4b9
[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 'foreign_table' => 'sys_language',
58 'foreign_table_where' => 'ORDER BY sys_language.title',
59 'items' => array(
60 array('LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1),
61 array('LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0)
62 ),
63 'default' => 0
64 )
65 ),
66 'l10n_parent' => array(
67 'displayCond' => 'FIELD:sys_language_uid:>:0',
68 'exclude' => 0,
69 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent',
70 'config' => array(
71 'type' => 'select',
72 'items' => array(
73 array('', 0)
74 ),
75 'foreign_table' => 'sys_file_reference',
76 'foreign_table_where' => 'AND sys_file_reference.uid=###REC_FIELD_l10n_parent### AND sys_file_reference.sys_language_uid IN (-1,0)',
77 'default' => 0
78 )
79 ),
80 'l10n_diffsource' => array(
81 'exclude' => 0,
82 'config' => array(
83 'type' => 'passthrough',
84 'default' => ''
85 )
86 ),
87 'hidden' => array(
88 'exclude' => 0,
89 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden',
90 'config' => array(
91 'type' => 'check',
92 'default' => '0'
93 )
94 ),
95 'uid_local' => array(
96 'exclude' => 0,
97 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.uid_local',
98 'config' => array(
99 'type' => 'group',
100 'internal_type' => 'db',
101 'size' => 1,
102 'maxitems' => 1,
103 'minitems' => 0,
104 'allowed' => 'sys_file'
105 )
106 ),
107 'uid_foreign' => array(
108 'exclude' => 0,
109 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.uid_foreign',
110 'config' => array(
111 'type' => 'input',
112 'size' => '10',
113 'eval' => 'int'
114 )
115 ),
116 'tablenames' => array(
117 'exclude' => 0,
118 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.tablenames',
119 'config' => array(
120 'type' => 'input',
121 'size' => '30',
122 'eval' => 'trim'
123 )
124 ),
125 'fieldname' => array(
126 'exclude' => 0,
127 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.fieldname',
128 'config' => array(
129 'type' => 'input',
130 'size' => '30'
131 )
132 ),
133 'sorting_foreign' => array(
134 'exclude' => 0,
135 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.sorting_foreign',
136 'config' => array(
137 'type' => 'input',
138 'size' => '4',
139 'max' => '4',
140 'eval' => 'int',
141 'checkbox' => '0',
142 'range' => array(
143 'upper' => '1000',
144 'lower' => '10'
145 ),
146 'default' => 0
147 )
148 ),
149 'table_local' => array(
150 'exclude' => 0,
151 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.table_local',
152 'config' => array(
153 'type' => 'input',
154 'size' => '20',
155 'default' => 'sys_file'
156 )
157 ),
158 'title' => array(
159 'l10n_mode' => 'prefixLangTitle',
160 'exclude' => 1,
161 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.title',
162 'config' => array(
163 'type' => 'input',
164 'size' => '20',
165 'eval' => 'null',
166 'placeholder' => '__row|uid_local|metadata|title',
167 'mode' => 'useOrOverridePlaceholder',
168 'default' => NULL,
169 )
170 ),
171 'link' => array(
172 'exclude' => 1,
173 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.link',
174 'config' => array(
175 'type' => 'input',
176 'size' => '20',
177 'max' => 1024,
178 'wizards' => array(
179 'link' => array(
180 'type' => 'popup',
181 'title' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.link',
182 'icon' => 'EXT:backend/Resources/Public/Images/FormFieldWizard/wizard_link.gif',
183 'module' => array(
184 'name' => 'wizard_element_browser',
185 'urlParameters' => array(
186 'mode' => 'wizard'
187 )
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 'canNotCollapse' => TRUE
291 ),
292 // Used for everything that is a audio file
293 'audioOverlayPalette' => array(
294 'showitem' => '
295 title,description,--linebreak--,autoplay
296 ',
297 'canNotCollapse' => TRUE
298 ),
299 // File palette, hidden but needs to be included all the time
300 'filePalette' => array(
301 'showitem' => 'uid_local, hidden, sys_language_uid, l10n_parent',
302 'isHiddenPalette' => TRUE,
303 ),
304 ),
305 );