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