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