[TASK] Cleanup TCA
[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 '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 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language',
53 'config' => array(
54 'type' => 'select',
55 'renderType' => 'selectSingle',
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 'default' => 0,
63 'showIconTable' => true,
64 )
65 ),
66 'l10n_parent' => array(
67 'displayCond' => 'FIELD:sys_language_uid:>:0',
68 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent',
69 'config' => array(
70 'type' => 'select',
71 'renderType' => 'selectSingle',
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 'config' => array(
82 'type' => 'passthrough',
83 'default' => ''
84 )
85 ),
86 'hidden' => array(
87 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden',
88 'config' => array(
89 'type' => 'check',
90 'default' => 0
91 )
92 ),
93 'uid_local' => array(
94 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.uid_local',
95 'config' => array(
96 'type' => 'group',
97 'internal_type' => 'db',
98 'size' => 1,
99 'eval' => 'int',
100 'maxitems' => 1,
101 'minitems' => 0,
102 'allowed' => 'sys_file'
103 )
104 ),
105 'uid_foreign' => array(
106 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.uid_foreign',
107 'config' => array(
108 'type' => 'input',
109 'size' => 10,
110 'eval' => 'int'
111 )
112 ),
113 'tablenames' => array(
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 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.fieldname',
123 'config' => array(
124 'type' => 'input',
125 'size' => 30
126 )
127 ),
128 'sorting_foreign' => array(
129 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.sorting_foreign',
130 'config' => array(
131 'type' => 'input',
132 'size' => 4,
133 'max' => 4,
134 'eval' => 'int',
135 'range' => array(
136 'upper' => '1000',
137 'lower' => '10'
138 ),
139 'default' => 0
140 )
141 ),
142 'table_local' => array(
143 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.table_local',
144 'config' => array(
145 'type' => 'input',
146 'size' => 20,
147 'default' => 'sys_file'
148 )
149 ),
150 'title' => array(
151 'l10n_mode' => 'prefixLangTitle',
152 'exclude' => true,
153 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.title',
154 'config' => array(
155 'type' => 'input',
156 'size' => 20,
157 'eval' => 'null',
158 'placeholder' => '__row|uid_local|metadata|title',
159 'mode' => 'useOrOverridePlaceholder',
160 'default' => null,
161 )
162 ),
163 'link' => array(
164 'exclude' => true,
165 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.link',
166 'config' => array(
167 'type' => 'input',
168 'size' => 20,
169 'max' => 1024,
170 'wizards' => array(
171 'link' => array(
172 'type' => 'popup',
173 'title' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.link',
174 'icon' => 'EXT:backend/Resources/Public/Images/FormFieldWizard/wizard_link.gif',
175 'module' => array(
176 'name' => 'wizard_link',
177 ),
178 'JSopenParams' => 'width=800,height=600,status=0,menubar=0,scrollbars=1'
179 )
180 ),
181 'softref' => 'typolink'
182 )
183 ),
184 'description' => array(
185 // This is used for captions in the frontend
186 'l10n_mode' => 'prefixLangTitle',
187 'exclude' => true,
188 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.description',
189 'config' => array(
190 'type' => 'text',
191 'cols' => 20,
192 'rows' => 5,
193 'eval' => 'null',
194 'placeholder' => '__row|uid_local|metadata|description',
195 'mode' => 'useOrOverridePlaceholder',
196 'default' => null,
197 )
198 ),
199 'alternative' => array(
200 'l10n_mode' => 'prefixLangTitle',
201 'exclude' => true,
202 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.alternative',
203 'config' => array(
204 'type' => 'input',
205 'size' => 20,
206 'eval' => 'null',
207 'placeholder' => '__row|uid_local|metadata|alternative',
208 'mode' => 'useOrOverridePlaceholder',
209 'default' => null,
210 ),
211 ),
212 'crop' => array(
213 'exclude' => true,
214 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.crop',
215 'config' => array(
216 'type' => 'imageManipulation'
217 )
218 ),
219 'autoplay' => array(
220 'exclude' => true,
221 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.autoplay',
222 'config' => array(
223 'type' => 'check',
224 'default' => 0
225 )
226 ),
227 ),
228 'types' => array(
229 // Note that at the moment we define the same fields for every media type.
230 // We leave the extensive definition of each type here anyway, to make clear that you can use it to differentiate between the types.
231 '0' => array(
232 'showitem' => '
233 --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
234 --palette--;;filePalette'
235 ),
236 \TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => array(
237 'showitem' => '
238 --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
239 --palette--;;filePalette'
240 ),
241 \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => 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_AUDIO => 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_VIDEO => 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_APPLICATION => array(
257 'showitem' => '
258 --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
259 --palette--;;filePalette'
260 )
261 ),
262 'palettes' => array(
263 // Used for basic overlays: having a filelist etc
264 'basicoverlayPalette' => array(
265 'showitem' => 'title,description',
266 ),
267 // Used for everything that is an image (because it has a link and an alternative text)
268 'imageoverlayPalette' => array(
269 'showitem' => '
270 title,alternative,--linebreak--,
271 link,description,--linebreak--,crop
272 ',
273 ),
274 // Used for everything that is a video
275 'videoOverlayPalette' => array(
276 'showitem' => '
277 title,description,--linebreak--,autoplay
278 ',
279 ),
280 // Used for everything that is a audio file
281 'audioOverlayPalette' => array(
282 'showitem' => '
283 title,description,--linebreak--,autoplay
284 ',
285 ),
286 // File palette, hidden but needs to be included all the time
287 'filePalette' => array(
288 'showitem' => 'uid_local, hidden, sys_language_uid, l10n_parent',
289 'isHiddenPalette' => true,
290 ),
291 ),
292 );