TYPO3 CMS  TYPO3_7-6
sys_file_reference.php
Go to the documentation of this file.
1 <?php
2 return [
3  'ctrl' => [
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' => [
8  'sys_file' => [
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' => [
28  'disabled' => 'hidden'
29  ],
30  'typeicon_classes' => [
31  'default' => 'mimetypes-other-other'
32  ],
33  'security' => [
34  'ignoreWebMountRestriction' => true,
35  'ignoreRootLevelRestriction' => true,
36  ],
37  'searchFields' => 'uid_local,uid_foreign,tablenames,fieldname,title,description'
38  ],
39  'interface' => [
40  'showRecordFieldList' => 'hidden,uid_local,uid_foreign,tablenames,fieldname,sorting_foreign,table_local,title,description'
41  ],
42  'columns' => [
43  't3ver_label' => [
44  'exclude' => 0,
45  'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel',
46  'config' => [
47  'type' => 'input',
48  'size' => '30',
49  'max' => '30'
50  ]
51  ],
52  'sys_language_uid' => [
53  'exclude' => 0,
54  'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language',
55  'config' => [
56  'type' => 'select',
57  'renderType' => 'selectSingle',
58  'foreign_table' => 'sys_language',
59  'foreign_table_where' => 'ORDER BY sys_language.title',
60  'items' => [
61  ['LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1],
62  ['LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0]
63  ],
64  'default' => 0,
65  'showIconTable' => true,
66  ]
67  ],
68  'l10n_parent' => [
69  'displayCond' => 'FIELD:sys_language_uid:>:0',
70  'exclude' => 0,
71  'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent',
72  'config' => [
73  'type' => 'select',
74  'renderType' => 'selectSingle',
75  'items' => [
76  ['', 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' => [
84  'exclude' => 0,
85  'config' => [
86  'type' => 'passthrough',
87  'default' => ''
88  ]
89  ],
90  'hidden' => [
91  'exclude' => 0,
92  'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden',
93  'config' => [
94  'type' => 'check',
95  'default' => '0'
96  ]
97  ],
98  'uid_local' => [
99  'exclude' => 0,
100  'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.uid_local',
101  'config' => [
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' => [
112  'exclude' => 0,
113  'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.uid_foreign',
114  'config' => [
115  'type' => 'input',
116  'size' => '10',
117  'eval' => 'int'
118  ]
119  ],
120  'tablenames' => [
121  'exclude' => 0,
122  'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.tablenames',
123  'config' => [
124  'type' => 'input',
125  'size' => '30',
126  'eval' => 'trim'
127  ]
128  ],
129  'fieldname' => [
130  'exclude' => 0,
131  'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.fieldname',
132  'config' => [
133  'type' => 'input',
134  'size' => '30'
135  ]
136  ],
137  'sorting_foreign' => [
138  'exclude' => 0,
139  'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.sorting_foreign',
140  'config' => [
141  'type' => 'input',
142  'size' => '4',
143  'max' => '4',
144  'eval' => 'int',
145  'default' => 0
146  ]
147  ],
148  'table_local' => [
149  'exclude' => 0,
150  'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.table_local',
151  'config' => [
152  'type' => 'input',
153  'size' => '20',
154  'default' => 'sys_file'
155  ]
156  ],
157  'title' => [
158  'l10n_mode' => 'prefixLangTitle',
159  'exclude' => 1,
160  'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.title',
161  'config' => [
162  'type' => 'input',
163  'size' => '20',
164  'max' => 255,
165  'eval' => 'null',
166  'placeholder' => '__row|uid_local|metadata|title',
167  'mode' => 'useOrOverridePlaceholder',
168  'default' => null,
169  ]
170  ],
171  'link' => [
172  'exclude' => 1,
173  'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.link',
174  'config' => [
175  'type' => 'input',
176  'size' => '20',
177  'max' => 1024,
178  'wizards' => [
179  'link' => [
180  'type' => 'popup',
181  'title' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.link',
182  'icon' => 'actions-wizard-link',
183  'module' => [
184  'name' => 'wizard_link',
185  ],
186  'JSopenParams' => 'width=800,height=600,status=0,menubar=0,scrollbars=1'
187  ]
188  ],
189  'softref' => 'typolink'
190  ]
191  ],
192  'description' => [
193  // This is used for captions in the frontend
194  'l10n_mode' => 'prefixLangTitle',
195  'exclude' => 1,
196  'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.description',
197  'config' => [
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' => [
208  'l10n_mode' => 'prefixLangTitle',
209  'exclude' => 1,
210  'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.alternative',
211  'config' => [
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  'crop' => [
221  'exclude' => 1,
222  'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.crop',
223  'config' => [
224  'type' => 'imageManipulation'
225  ]
226  ],
227  'autoplay' => [
228  'exclude' => 1,
229  'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.autoplay',
230  'config' => [
231  'type' => 'check',
232  'default' => 0
233  ]
234  ],
235  ],
236  'types' => [
237  // Note that at the moment we define the same fields for every media type.
238  // We leave the extensive definition of each type here anyway, to make clear that you can use it to differentiate between the types.
239  '0' => [
240  'showitem' => '
241  --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
242  --palette--;;filePalette'
243  ],
245  'showitem' => '
246  --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
247  --palette--;;filePalette'
248  ],
250  'showitem' => '
251  --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
252  --palette--;;filePalette'
253  ],
255  'showitem' => '
256  --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
257  --palette--;;filePalette'
258  ],
260  'showitem' => '
261  --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
262  --palette--;;filePalette'
263  ],
265  'showitem' => '
266  --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
267  --palette--;;filePalette'
268  ]
269  ],
270  'palettes' => [
271  // Used for basic overlays: having a filelist etc
272  'basicoverlayPalette' => [
273  'showitem' => 'title,description',
274  ],
275  // Used for everything that is an image (because it has a link and an alternative text)
276  'imageoverlayPalette' => [
277  'showitem' => '
278  title,alternative,--linebreak--,
279  link,description,--linebreak--,crop
280  ',
281  ],
282  // Used for everything that is a video
283  'videoOverlayPalette' => [
284  'showitem' => '
285  title,description,--linebreak--,autoplay
286  ',
287  ],
288  // Used for everything that is a audio file
289  'audioOverlayPalette' => [
290  'showitem' => '
291  title,description,--linebreak--,autoplay
292  ',
293  ],
294  // File palette, hidden but needs to be included all the time
295  'filePalette' => [
296  'showitem' => 'uid_local, hidden, sys_language_uid, l10n_parent',
297  'isHiddenPalette' => true,
298  ],
299  ],
300 ];