TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
sys_file_reference.php
Go to the documentation of this file.
1 <?php
2 return [
3  'ctrl' => [
4  'title' => 'LLL:EXT:lang/Resources/Private/Language/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  'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel',
45  'config' => [
46  'type' => 'input',
47  'size' => 30,
48  'max' => 30
49  ]
50  ],
51  'sys_language_uid' => [
52  'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.language',
53  'config' => [
54  'type' => 'select',
55  'renderType' => 'selectSingle',
56  'foreign_table' => 'sys_language',
57  'foreign_table_where' => 'ORDER BY sys_language.title',
58  'items' => [
59  ['LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1],
60  ['LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0]
61  ],
62  'default' => 0,
63  'showIconTable' => true,
64  ]
65  ],
66  'l10n_parent' => [
67  'displayCond' => 'FIELD:sys_language_uid:>:0',
68  'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
69  'config' => [
70  'type' => 'select',
71  'renderType' => 'selectSingle',
72  'items' => [
73  ['', 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' => [
81  'config' => [
82  'type' => 'passthrough',
83  'default' => ''
84  ]
85  ],
86  'hidden' => [
87  'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.hidden',
88  'config' => [
89  'type' => 'check',
90  'default' => 0
91  ]
92  ],
93  'uid_local' => [
94  'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.uid_local',
95  'config' => [
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' => [
106  'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.uid_foreign',
107  'config' => [
108  'type' => 'input',
109  'size' => 10,
110  'eval' => 'int'
111  ]
112  ],
113  'tablenames' => [
114  'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.tablenames',
115  'config' => [
116  'type' => 'input',
117  'size' => 30,
118  'eval' => 'trim'
119  ]
120  ],
121  'fieldname' => [
122  'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.fieldname',
123  'config' => [
124  'type' => 'input',
125  'size' => 30
126  ]
127  ],
128  'sorting_foreign' => [
129  'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.sorting_foreign',
130  'config' => [
131  'type' => 'input',
132  'size' => 4,
133  'max' => 4,
134  'eval' => 'int',
135  'range' => [
136  'upper' => '1000',
137  'lower' => '10'
138  ],
139  'default' => 0
140  ]
141  ],
142  'table_local' => [
143  'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.table_local',
144  'config' => [
145  'type' => 'input',
146  'size' => 20,
147  'default' => 'sys_file'
148  ]
149  ],
150  'title' => [
151  'l10n_mode' => 'prefixLangTitle',
152  'exclude' => true,
153  'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.title',
154  'config' => [
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' => [
164  'exclude' => true,
165  'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.link',
166  'config' => [
167  'type' => 'input',
168  'size' => 20,
169  'max' => 1024,
170  'wizards' => [
171  'link' => [
172  'type' => 'popup',
173  'title' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.link',
174  'icon' => 'actions-wizard-link',
175  'module' => [
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' => [
185  // This is used for captions in the frontend
186  'l10n_mode' => 'prefixLangTitle',
187  'exclude' => true,
188  'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.description',
189  'config' => [
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' => [
200  'l10n_mode' => 'prefixLangTitle',
201  'exclude' => true,
202  'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.alternative',
203  'config' => [
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' => [
213  'exclude' => true,
214  'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.crop',
215  'config' => [
216  'type' => 'imageManipulation'
217  ]
218  ],
219  'autoplay' => [
220  'exclude' => true,
221  'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.autoplay',
222  'config' => [
223  'type' => 'check',
224  'default' => 0
225  ]
226  ],
227  ],
228  'types' => [
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' => [
232  'showitem' => '
233  --palette--;LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
234  --palette--;;filePalette'
235  ],
237  'showitem' => '
238  --palette--;LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
239  --palette--;;filePalette'
240  ],
242  'showitem' => '
243  --palette--;LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
244  --palette--;;filePalette'
245  ],
247  'showitem' => '
248  --palette--;LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
249  --palette--;;filePalette'
250  ],
252  'showitem' => '
253  --palette--;LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
254  --palette--;;filePalette'
255  ],
257  'showitem' => '
258  --palette--;LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
259  --palette--;;filePalette'
260  ]
261  ],
262  'palettes' => [
263  // Used for basic overlays: having a filelist etc
264  'basicoverlayPalette' => [
265  'showitem' => 'title,description',
266  ],
267  // Used for everything that is an image (because it has a link and an alternative text)
268  'imageoverlayPalette' => [
269  'showitem' => '
270  title,alternative,--linebreak--,
271  link,description,--linebreak--,crop
272  ',
273  ],
274  // Used for everything that is a video
275  'videoOverlayPalette' => [
276  'showitem' => '
277  title,description,--linebreak--,autoplay
278  ',
279  ],
280  // Used for everything that is a audio file
281  'audioOverlayPalette' => [
282  'showitem' => '
283  title,description,--linebreak--,autoplay
284  ',
285  ],
286  // File palette, hidden but needs to be included all the time
287  'filePalette' => [
288  'showitem' => 'uid_local, hidden, sys_language_uid, l10n_parent',
289  'isHiddenPalette' => true,
290  ],
291  ],
292 ];