[BUGFIX] Allow search for FAL related DB records
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Configuration / TCA / sys_file_reference.php
1 <?php
2 return array(
3 'ctrl' => array(
4 'title' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference',
5 'label' => 'uid',
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 'security' => array(
30 'ignoreWebMountRestriction' => TRUE,
31 'ignoreRootLevelRestriction' => TRUE,
32 ),
33 'searchFields' => 'uid_local,uid_foreign,tablenames,fieldname,title,description'
34 ),
35 'interface' => array(
36 'showRecordFieldList' => 'hidden,uid_local,uid_foreign,tablenames,fieldname,sorting_foreign,table_local,title,description'
37 ),
38 'columns' => array(
39 't3ver_label' => array(
40 'exclude' => 0,
41 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel',
42 'config' => array(
43 'type' => 'input',
44 'size' => '30',
45 'max' => '30'
46 )
47 ),
48 'sys_language_uid' => array(
49 'exclude' => 0,
50 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language',
51 'config' => array(
52 'type' => 'select',
53 'foreign_table' => 'sys_language',
54 'foreign_table_where' => 'ORDER BY sys_language.title',
55 'items' => array(
56 array('LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1),
57 array('LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0)
58 )
59 )
60 ),
61 'l10n_parent' => array(
62 'displayCond' => 'FIELD:sys_language_uid:>:0',
63 'exclude' => 0,
64 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent',
65 'config' => array(
66 'type' => 'select',
67 'items' => array(
68 array('', 0)
69 ),
70 'foreign_table' => 'sys_file_reference',
71 'foreign_table_where' => 'AND sys_file_reference.uid=###REC_FIELD_l10n_parent### AND sys_file_reference.sys_language_uid IN (-1,0)'
72 )
73 ),
74 'l10n_diffsource' => array(
75 'exclude' => 0,
76 'config' => array(
77 'type' => 'passthrough'
78 )
79 ),
80 'hidden' => array(
81 'exclude' => 0,
82 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden',
83 'config' => array(
84 'type' => 'check',
85 'default' => '0'
86 )
87 ),
88 'uid_local' => array(
89 'exclude' => 0,
90 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.uid_local',
91 'config' => array(
92 'type' => 'group',
93 'internal_type' => 'db',
94 'size' => 1,
95 'maxitems' => 1,
96 'minitems' => 0,
97 'allowed' => 'sys_file'
98 )
99 ),
100 'uid_foreign' => array(
101 'exclude' => 0,
102 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.uid_foreign',
103 'config' => array(
104 'type' => 'input',
105 'size' => '10',
106 'eval' => 'int'
107 )
108 ),
109 'tablenames' => array(
110 'exclude' => 0,
111 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.tablenames',
112 'config' => array(
113 'type' => 'input',
114 'size' => '30',
115 'eval' => 'trim'
116 )
117 ),
118 'fieldname' => array(
119 'exclude' => 0,
120 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.fieldname',
121 'config' => array(
122 'type' => 'input',
123 'size' => '30'
124 )
125 ),
126 'sorting_foreign' => array(
127 'exclude' => 0,
128 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.sorting_foreign',
129 'config' => array(
130 'type' => 'input',
131 'size' => '4',
132 'max' => '4',
133 'eval' => 'int',
134 'checkbox' => '0',
135 'range' => array(
136 'upper' => '1000',
137 'lower' => '10'
138 ),
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 )
162 ),
163 'link' => array(
164 'l10n_mode' => 'mergeIfNotBlank',
165 'exclude' => 1,
166 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.link',
167 'config' => array(
168 'type' => 'input',
169 'size' => '20',
170 'wizards' => array(
171 '_PADDING' => 2,
172 'link' => array(
173 'type' => 'popup',
174 'title' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.link',
175 'icon' => 'link_popup.gif',
176 'script' => 'browse_links.php?mode=wizard',
177 'JSopenParams' => 'height=300,width=500,status=0,menubar=0,scrollbars=1'
178 )
179 )
180 )
181 ),
182 'description' => array(
183 // This is used for captions in the frontend
184 'l10n_mode' => 'mergeIfNotBlank',
185 'exclude' => 1,
186 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.description',
187 'config' => array(
188 'type' => 'text',
189 'cols' => '20',
190 'rows' => '5',
191 'eval' => 'null',
192 'placeholder' => '__row|uid_local|metadata|description',
193 'mode' => 'useOrOverridePlaceholder',
194 )
195 ),
196 'alternative' => array(
197 'l10n_mode' => 'mergeIfNotBlank',
198 'exclude' => 1,
199 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.alternative',
200 'config' => array(
201 'type' => 'input',
202 'size' => '20',
203 'eval' => 'null',
204 'placeholder' => '__row|uid_local|metadata|alternative',
205 'mode' => 'useOrOverridePlaceholder',
206 ),
207 ),
208 ),
209 'types' => array(
210 // Note that at the moment we define the same fields for every media type.
211 // We leave the extensive definition of each type here anyway, to make clear that you can use it to differentiate between the types.
212 '0' => array(
213 'showitem' => '
214 --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
215 --palette--;;filePalette'
216 ),
217 \TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => array(
218 'showitem' => '
219 --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
220 --palette--;;filePalette'
221 ),
222 \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => 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_AUDIO => 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_VIDEO => 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_APPLICATION => array(
238 'showitem' => '
239 --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
240 --palette--;;filePalette'
241 )
242 ),
243 'palettes' => array(
244 // Used for basic overlays: having a file list etc
245 'basicoverlayPalette' => array(
246 'showitem' => 'title,description',
247 'canNotCollapse' => TRUE
248 ),
249 // Used for everything that is an image (because it has a link and a alternative text)
250 'imageoverlayPalette' => array(
251 'showitem' => '
252 title,alternative;;;;3-3-3,--linebreak--,
253 link,description
254 ',
255 'canNotCollapse' => TRUE
256 ),
257 // File palette, hidden but needs to be included all the time
258 'filePalette' => array(
259 'showitem' => 'uid_local, hidden, sys_language_uid, l10n_parent',
260 'isHiddenPalette' => TRUE
261 )
262 )
263 );