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