TYPO3 CMS  TYPO3_6-2
sys_file_reference.php
Go to the documentation of this file.
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' => '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  'eval' => 'int',
99  'maxitems' => 1,
100  'minitems' => 0,
101  'allowed' => 'sys_file'
102  )
103  ),
104  'uid_foreign' => array(
105  'exclude' => 0,
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  'exclude' => 0,
115  'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.tablenames',
116  'config' => array(
117  'type' => 'input',
118  'size' => '30',
119  'eval' => 'trim'
120  )
121  ),
122  'fieldname' => array(
123  'exclude' => 0,
124  'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.fieldname',
125  'config' => array(
126  'type' => 'input',
127  'size' => '30'
128  )
129  ),
130  'sorting_foreign' => array(
131  'exclude' => 0,
132  'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.sorting_foreign',
133  'config' => array(
134  'type' => 'input',
135  'size' => '4',
136  'max' => '4',
137  'eval' => 'int',
138  'checkbox' => '0',
139  'default' => 0
140  )
141  ),
142  'table_local' => array(
143  'exclude' => 0,
144  'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.table_local',
145  'config' => array(
146  'type' => 'input',
147  'size' => '20',
148  'default' => 'sys_file'
149  )
150  ),
151  'title' => array(
152  'l10n_mode' => 'mergeIfNotBlank',
153  'exclude' => 1,
154  'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.title',
155  'config' => array(
156  'type' => 'input',
157  'size' => '20',
158  'eval' => 'null',
159  'placeholder' => '__row|uid_local|metadata|title',
160  'mode' => 'useOrOverridePlaceholder',
161  'default' => NULL,
162  )
163  ),
164  'link' => array(
165  'l10n_mode' => 'mergeIfNotBlank',
166  'exclude' => 1,
167  'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.link',
168  'config' => array(
169  'type' => 'input',
170  'size' => '20',
171  'max' => 1024,
172  'wizards' => array(
173  '_PADDING' => 2,
174  'link' => array(
175  'type' => 'popup',
176  'title' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.link',
177  'icon' => 'link_popup.gif',
178  'module' => array(
179  'name' => 'wizard_element_browser',
180  'urlParameters' => array(
181  'mode' => 'wizard'
182  )
183  ),
184  'JSopenParams' => 'height=300,width=500,status=0,menubar=0,scrollbars=1'
185  )
186  ),
187  'softref' => 'typolink'
188  )
189  ),
190  'description' => array(
191  // This is used for captions in the frontend
192  'l10n_mode' => 'mergeIfNotBlank',
193  'exclude' => 1,
194  'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.description',
195  'config' => array(
196  'type' => 'text',
197  'cols' => '20',
198  'rows' => '5',
199  'eval' => 'null',
200  'placeholder' => '__row|uid_local|metadata|description',
201  'mode' => 'useOrOverridePlaceholder',
202  'default' => NULL,
203  )
204  ),
205  'alternative' => array(
206  'l10n_mode' => 'mergeIfNotBlank',
207  'exclude' => 1,
208  'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.alternative',
209  'config' => array(
210  'type' => 'input',
211  'size' => '20',
212  'eval' => 'null',
213  'placeholder' => '__row|uid_local|metadata|alternative',
214  'mode' => 'useOrOverridePlaceholder',
215  'default' => NULL,
216  ),
217  ),
218  ),
219  'types' => array(
220  // Note that at the moment we define the same fields for every media type.
221  // We leave the extensive definition of each type here anyway, to make clear that you can use it to differentiate between the types.
222  '0' => 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_TEXT => 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_IMAGE => 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_AUDIO => 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_VIDEO => array(
243  'showitem' => '
244  --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
245  --palette--;;filePalette'
246  ),
247  \TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => array(
248  'showitem' => '
249  --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
250  --palette--;;filePalette'
251  )
252  ),
253  'palettes' => array(
254  // Used for basic overlays: having a file list etc
255  'basicoverlayPalette' => array(
256  'showitem' => 'title,description',
257  'canNotCollapse' => TRUE
258  ),
259  // Used for everything that is an image (because it has a link and a alternative text)
260  'imageoverlayPalette' => array(
261  'showitem' => '
262  title,alternative;;;;3-3-3,--linebreak--,
263  link,description
264  ',
265  'canNotCollapse' => TRUE
266  ),
267  // File palette, hidden but needs to be included all the time
268  'filePalette' => array(
269  'showitem' => 'uid_local, hidden, sys_language_uid, l10n_parent',
270  'isHiddenPalette' => TRUE
271  )
272  )
273 );