Added Feature #16641: Here comes FAL - beta2 version
[Packages/TYPO3.CMS.git] / typo3 / sysext / fal / tca.php
1 <?php
2 if (!defined ('TYPO3_MODE')) die ('Access denied.');
3
4 $TCA['sys_files'] = array (
5 'ctrl' => $TCA['sys_files']['ctrl'],
6 'interface' => array (
7 'showRecordFieldList' => 'sys_language_uid,l10n_parent,l10n_diffsource,hidden,starttime,endtime,fe_group,file_name,file_path,file_size,file_mtime,file_inode,file_ctime,file_hash,file_mime_type,file_mime_subtype,file_type,file_type_version,file_usage'
8 ),
9 'feInterface' => $TCA['sys_files']['feInterface'],
10 'columns' => array (
11 'sys_language_uid' => array (
12 'exclude' => 1,
13 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.language',
14 'config' => array (
15 'type' => 'select',
16 'foreign_table' => 'sys_language',
17 'foreign_table_where' => 'ORDER BY sys_language.title',
18 'items' => array(
19 array('LLL:EXT:lang/locallang_general.xml:LGL.allLanguages', -1),
20 array('LLL:EXT:lang/locallang_general.xml:LGL.default_value', 0)
21 )
22 )
23 ),
24 'l10n_parent' => array (
25 'displayCond' => 'FIELD:sys_language_uid:>:0',
26 'exclude' => 1,
27 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.l18n_parent',
28 'config' => array (
29 'type' => 'select',
30 'items' => array (
31 array('', 0),
32 ),
33 'foreign_table' => 'tx_fal_sys_files',
34 'foreign_table_where' => 'AND tx_fal_sys_files.pid=###CURRENT_PID### AND tx_fal_sys_files.sys_language_uid IN (-1,0)',
35 )
36 ),
37 'l10n_diffsource' => array (
38 'config' => array (
39 'type' => 'passthrough'
40 )
41 ),
42 'hidden' => array (
43 'exclude' => 1,
44 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden',
45 'config' => array (
46 'type' => 'check',
47 'default' => '0'
48 )
49 ),
50 'starttime' => array (
51 'exclude' => 1,
52 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.starttime',
53 'config' => array (
54 'type' => 'input',
55 'size' => '8',
56 'max' => '20',
57 'eval' => 'date',
58 'default' => '0',
59 'checkbox' => '0'
60 )
61 ),
62 'fe_group' => array (
63 'exclude' => 1,
64 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.fe_group',
65 'config' => array (
66 'type' => 'select',
67 'items' => array (
68 array('', 0),
69 array('LLL:EXT:lang/locallang_general.xml:LGL.hide_at_login', -1),
70 array('LLL:EXT:lang/locallang_general.xml:LGL.any_login', -2),
71 array('LLL:EXT:lang/locallang_general.xml:LGL.usergroups', '--div--')
72 ),
73 'foreign_table' => 'fe_groups'
74 )
75 ),
76 'file_name' => array (
77 'exclude' => 0,
78 'label' => 'LLL:EXT:fal/locallang_db.xml:tx_fal_sys_files.file_name',
79 'config' => array (
80 'type' => 'input',
81 'size' => '30',
82 )
83 ),
84 'file_path' => array (
85 'exclude' => 0,
86 'label' => 'LLL:EXT:fal/locallang_db.xml:tx_fal_sys_files.file_path',
87 'config' => array (
88 'type' => 'input',
89 'size' => '30',
90 )
91 ),
92 'file_size' => array (
93 'exclude' => 0,
94 'label' => 'LLL:EXT:fal/locallang_db.xml:tx_fal_sys_files.file_size',
95 'config' => array (
96 'type' => 'input',
97 'size' => '4',
98 'max' => '4',
99 'eval' => 'int',
100 'checkbox' => '0',
101 'range' => array (
102 'upper' => '1000',
103 'lower' => '10'
104 ),
105 'default' => 0
106 )
107 ),
108 'file_mtime' => array (
109 'exclude' => 0,
110 'label' => 'LLL:EXT:fal/locallang_db.xml:tx_fal_sys_files.file_mtime',
111 'config' => array (
112 'type' => 'input',
113 'size' => '12',
114 'max' => '20',
115 'eval' => 'datetime',
116 'checkbox' => '0',
117 'default' => '0'
118 )
119 ),
120 'file_inode' => array (
121 'exclude' => 0,
122 'label' => 'LLL:EXT:fal/locallang_db.xml:tx_fal_sys_files.file_inode',
123 'config' => array (
124 'type' => 'input',
125 'size' => '4',
126 'max' => '4',
127 'eval' => 'int',
128 'checkbox' => '0',
129 'range' => array (
130 'upper' => '1000',
131 'lower' => '10'
132 ),
133 'default' => 0
134 )
135 ),
136 'file_ctime' => array (
137 'exclude' => 0,
138 'label' => 'LLL:EXT:fal/locallang_db.xml:tx_fal_sys_files.file_ctime',
139 'config' => array (
140 'type' => 'input',
141 'size' => '12',
142 'max' => '20',
143 'eval' => 'datetime',
144 'checkbox' => '0',
145 'default' => '0'
146 )
147 ),
148 'file_hash' => array (
149 'exclude' => 0,
150 'label' => 'LLL:EXT:fal/locallang_db.xml:tx_fal_sys_files.file_hash',
151 'config' => array (
152 'type' => 'input',
153 'size' => '48',
154 )
155 ),
156 'file_mime_type' => array (
157 'exclude' => 0,
158 'label' => 'LLL:EXT:fal/locallang_db.xml:tx_fal_sys_files.file_mime_type',
159 'config' => array (
160 'type' => 'input',
161 'size' => '30',
162 'max' => '45',
163 )
164 ),
165 'file_mime_subtype' => array (
166 'exclude' => 0,
167 'label' => 'LLL:EXT:fal/locallang_db.xml:tx_fal_sys_files.file_mime_subtype',
168 'config' => array (
169 'type' => 'input',
170 'size' => '30',
171 'max' => '45',
172 )
173 ),
174 'file_type' => array (
175 'exclude' => 0,
176 'label' => 'LLL:EXT:fal/locallang_db.xml:tx_fal_sys_files.file_type',
177 'config' => array (
178 'type' => 'input',
179 'size' => '9',
180 )
181 ),
182 'file_type_version' => array (
183 'exclude' => 0,
184 'label' => 'LLL:EXT:fal/locallang_db.xml:tx_fal_sys_files.file_type_version',
185 'config' => array (
186 'type' => 'input',
187 'size' => '10',
188 )
189 ),
190 'file_usage' => array (
191 'exclude' => 0,
192 'label' => 'LLL:EXT:fal/locallang_db.xml:tx_fal_sys_files.file_usage',
193 'config' => array (
194 'type' => 'group',
195 'internal_type' => 'db',
196 'allowed' => '*',
197 'size' => 5,
198 'minitems' => 0,
199 'MM' => 'sys_files_usage_mm',
200 )
201 ),
202 ),
203 'types' => array (
204 '0' => array('showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;1, file_name, file_path, file_size, file_mtime, file_inode, file_ctime, file_hash, file_mime_type, file_mime_subtype, file_type, file_type_version, file_usage')
205 ),
206 'palettes' => array (
207 '1' => array('showitem' => 'starttime, fe_group')
208 )
209 );
210
211
212 $TCA['sys_files_mounts'] = array (
213 'ctrl' => $TCA['sys_files_mounts']['ctrl'],
214 'interface' => array (
215 'showRecordFieldList' => 'hidden,title,storage_backend,backend_configuration'
216 ),
217 'feInterface' => $TCA['sys_files_mounts']['feInterface'],
218 'columns' => array (
219 'title' => array(
220 'exclude' => 0,
221 'label' => 'LLL:EXT:fal/locallang_db.xml:tx_fal_sys_files_mounts.title',
222 'config' => array(
223 'type' => 'input',
224 'size' => 30
225 )
226 ),
227 'alias' => array(
228 'exclude' => 0,
229 'label' => 'LLL:EXT:fal/locallang_db.xml:tx_fal_sys_files_mounts.alias',
230 'config' => array(
231 'type' => 'input',
232 'size' => 30,
233 'eval' => 'unique,alphanum'
234 )
235 ),
236 'storage_backend' => array(
237 'exclude' => 1,
238 'label' => 'LLL:EXT:fal/locallang_db.xml:tx_fal_sys_files_mounts.storage_backend',
239 'config' => array(
240 'type' => 'select',
241 'items' => array(
242 array('Filesystem', 'tx_fal_storage_FileSystemStorage')
243 )
244 )
245 ),
246 'backend_configuration' => array(
247 'exclude' => 1,
248 'label' => 'LLL:EXT:fal/locallang_db.xml:tx_fal_sys_files_mounts.backend_configuration',
249 'config' => array(
250 'type' => 'flex',
251 'ds_pointerField' => 'storage_backend',
252 'ds' => array(
253 'tx_fal_storage_FileSystemStorage' => 'FILE:EXT:fal/ds_filesystemstorage.xml',
254 )
255 )
256 )
257 ),
258 'types' => array (
259 '0' => array('showitem' => 'title;;;;1-1-1, alias, storage_backend, backend_configuration')
260 ),
261 'palettes' => array (
262 '1' => array('showitem' => '')
263 )
264 );
265 ?>