[TASK] Rename TCA type image_manipulation to imageManipulation
[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 '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 'maxitems' => 1,
99 'minitems' => 0,
100 'allowed' => 'sys_file'
101 )
102 ),
103 'uid_foreign' => array(
104 'exclude' => 0,
105 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.uid_foreign',
106 'config' => array(
107 'type' => 'input',
108 'size' => '10',
109 'eval' => 'int'
110 )
111 ),
112 'tablenames' => array(
113 'exclude' => 0,
114 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.tablenames',
115 'config' => array(
116 'type' => 'input',
117 'size' => '30',
118 'eval' => 'trim'
119 )
120 ),
121 'fieldname' => array(
122 'exclude' => 0,
123 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.fieldname',
124 'config' => array(
125 'type' => 'input',
126 'size' => '30'
127 )
128 ),
129 'sorting_foreign' => array(
130 'exclude' => 0,
131 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.sorting_foreign',
132 'config' => array(
133 'type' => 'input',
134 'size' => '4',
135 'max' => '4',
136 'eval' => 'int',
137 'checkbox' => '0',
138 'range' => array(
139 'upper' => '1000',
140 'lower' => '10'
141 ),
142 'default' => 0
143 )
144 ),
145 'table_local' => array(
146 'exclude' => 0,
147 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.table_local',
148 'config' => array(
149 'type' => 'input',
150 'size' => '20',
151 'default' => 'sys_file'
152 )
153 ),
154 'title' => array(
155 'l10n_mode' => 'mergeIfNotBlank',
156 'exclude' => 1,
157 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.title',
158 'config' => array(
159 'type' => 'input',
160 'size' => '20',
161 'eval' => 'null',
162 'placeholder' => '__row|uid_local|metadata|title',
163 'mode' => 'useOrOverridePlaceholder',
164 'default' => NULL,
165 )
166 ),
167 'link' => array(
168 'l10n_mode' => 'mergeIfNotBlank',
169 'exclude' => 1,
170 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.link',
171 'config' => array(
172 'type' => 'input',
173 'size' => '20',
174 'max' => 1024,
175 'wizards' => array(
176 'link' => array(
177 'type' => 'popup',
178 'title' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.link',
179 'icon' => 'link_popup.gif',
180 'module' => array(
181 'name' => 'wizard_element_browser',
182 'urlParameters' => array(
183 'mode' => 'wizard'
184 )
185 ),
186 'JSopenParams' => 'height=300,width=500,status=0,menubar=0,scrollbars=1'
187 )
188 ),
189 'softref' => 'typolink'
190 )
191 ),
192 'description' => array(
193 // This is used for captions in the frontend
194 'l10n_mode' => 'mergeIfNotBlank',
195 'exclude' => 1,
196 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.description',
197 'config' => array(
198 'type' => 'text',
199 'cols' => '20',
200 'rows' => '5',
201 'eval' => 'null',
202 'placeholder' => '__row|uid_local|metadata|description',
203 'mode' => 'useOrOverridePlaceholder',
204 'default' => NULL,
205 )
206 ),
207 'alternative' => array(
208 'l10n_mode' => 'mergeIfNotBlank',
209 'exclude' => 1,
210 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.alternative',
211 'config' => array(
212 'type' => 'input',
213 'size' => '20',
214 'eval' => 'null',
215 'placeholder' => '__row|uid_local|metadata|alternative',
216 'mode' => 'useOrOverridePlaceholder',
217 'default' => NULL,
218 ),
219 ),
220 'crop' => array(
221 'exclude' => 1,
222 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.crop',
223 'config' => array(
224 'type' => 'imageManipulation'
225 )
226 )
227 ),
228 'types' => array(
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' => array(
232 'showitem' => '
233 --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
234 --palette--;;filePalette'
235 ),
236 \TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => array(
237 'showitem' => '
238 --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
239 --palette--;;filePalette'
240 ),
241 \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => array(
242 'showitem' => '
243 --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
244 --palette--;;filePalette'
245 ),
246 \TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => array(
247 'showitem' => '
248 --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
249 --palette--;;filePalette'
250 ),
251 \TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => array(
252 'showitem' => '
253 --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
254 --palette--;;filePalette'
255 ),
256 \TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => array(
257 'showitem' => '
258 --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
259 --palette--;;filePalette'
260 )
261 ),
262 'palettes' => array(
263 // Used for basic overlays: having a file list etc
264 'basicoverlayPalette' => array(
265 'showitem' => 'title,description',
266 'canNotCollapse' => TRUE
267 ),
268 // Used for everything that is an image (because it has a link and a alternative text)
269 'imageoverlayPalette' => array(
270 'showitem' => '
271 title,alternative,--linebreak--,
272 link,description,--linebreak--,crop
273 ',
274 'canNotCollapse' => TRUE
275 ),
276 // File palette, hidden but needs to be included all the time
277 'filePalette' => array(
278 'showitem' => 'uid_local, hidden, sys_language_uid, l10n_parent',
279 'isHiddenPalette' => TRUE
280 )
281 )
282 );