[BUGFIX] Fallback of FAL properties does not work
[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 'placeholder' => '__row|uid_local|description',
171 )
172 ),
173 'alternative' => array(
174 'l10n_mode' => 'mergeIfNotBlank',
175 'exclude' => 0,
176 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.alternative',
177 'config' => array(
178 'type' => 'input',
179 'eval' => 'null',
180 'size' => '22',
181 'placeholder' => '__row|uid_local|alternative',
182 ),
183 ),
184 ),
185 'types' => array(
186 // Note that at the moment we define the same fields for every media type.
187 // We leave the extensive definition of each type here anyway, to make clear that you can use it to differentiate between the types.
188 '0' => array(
189 'showitem' => '
190 --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
191 --palette--;;filePalette'
192 ),
193 \TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => array(
194 'showitem' => '
195 --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
196 --palette--;;filePalette'
197 ),
198 \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => array(
199 'showitem' => '
200 --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
201 --palette--;;filePalette'
202 ),
203 \TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => array(
204 'showitem' => '
205 --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
206 --palette--;;filePalette'
207 ),
208 \TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => array(
209 'showitem' => '
210 --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
211 --palette--;;filePalette'
212 ),
213 \TYPO3\CMS\Core\Resource\File::FILETYPE_SOFTWARE => array(
214 'showitem' => '
215 --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
216 --palette--;;filePalette'
217 )
218 ),
219 'palettes' => array(
220 // used for basic overlays: having a file list etc
221 'basicoverlayPalette' => array(
222 'showitem' => 'title,description',
223 'canNotCollapse' => TRUE
224 ),
225 // used for everything that is an image (because it has a link and a alternative text)
226 'imageoverlayPalette' => array(
227 'showitem' => '
228 title,alternative;;;;3-3-3,--linebreak--,
229 link,description
230 ',
231 'canNotCollapse' => TRUE
232 ),
233 // file palette, hidden but needs to be included all the time
234 'filePalette' => array(
235 'showitem' => 'uid_local, hidden, sys_language_uid, l10n_parent',
236 'isHiddenPalette' => TRUE
237 )
238 )
239 );
240 ?>