[FEATURE] add sorting on sys_category
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Configuration / TCA / sys_category.php
1 <?php
2 return array(
3 'ctrl' => array(
4 'title' => 'LLL:EXT:lang/locallang_tca.xlf:sys_category',
5 'label' => 'title',
6 'tstamp' => 'tstamp',
7 'crdate' => 'crdate',
8 'cruser_id' => 'cruser_id',
9 'delete' => 'deleted',
10 'sortby' => 'sorting',
11 'dividers2tabs' => TRUE,
12 'versioningWS' => 2,
13 'rootLevel' => -1,
14 'versioning_followPages' => TRUE,
15 'origUid' => 't3_origuid',
16 'languageField' => 'sys_language_uid',
17 'transOrigPointerField' => 'l10n_parent',
18 'transOrigDiffSourceField' => 'l10n_diffsource',
19 'searchFields' => 'title,description',
20 'enablecolumns' => array(
21 'disabled' => 'hidden',
22 'starttime' => 'starttime',
23 'endtime' => 'endtime'
24 ),
25 'typeicon_classes' => array(
26 'default' => 'mimetypes-x-sys_category'
27 )
28 ),
29 'interface' => array(
30 'showRecordFieldList' => 'title,description'
31 ),
32 'types' => array(
33 '1' => array('showitem' => 'title;;1, parent,description,--div--;LLL:EXT:lang/locallang_tca.xlf:sys_category.tabs.items,items,--div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access,starttime, endtime')
34 ),
35 'palettes' => array(
36 '1' => array('showitem' => 'sys_language_uid, l10n_parent, hidden')
37 ),
38 'columns' => array(
39 't3ver_label' => array(
40 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel',
41 'config' => array(
42 'type' => 'input',
43 'size' => '30',
44 'max' => '30'
45 )
46 ),
47 'sys_language_uid' => array(
48 'exclude' => 1,
49 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language',
50 'config' => array(
51 'type' => 'select',
52 'foreign_table' => 'sys_language',
53 'foreign_table_where' => 'ORDER BY sys_language.title',
54 'items' => array(
55 array('LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1),
56 array('LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0)
57 )
58 )
59 ),
60 'l10n_parent' => array(
61 'displayCond' => 'FIELD:sys_language_uid:>:0',
62 'exclude' => 1,
63 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent',
64 'config' => array(
65 'type' => 'select',
66 'items' => array(
67 array('', 0)
68 ),
69 'foreign_table' => 'sys_category',
70 'foreign_table_where' => 'AND sys_category.uid=###REC_FIELD_l10n_parent### AND sys_category.sys_language_uid IN (-1,0)'
71 )
72 ),
73 'l10n_diffsource' => array(
74 'config' => array(
75 'type' => 'passthrough'
76 )
77 ),
78 'hidden' => array(
79 'exclude' => 1,
80 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden',
81 'config' => array(
82 'type' => 'check'
83 )
84 ),
85 'starttime' => array(
86 'exclude' => 1,
87 'l10n_mode' => 'mergeIfNotBlank',
88 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.starttime',
89 'config' => array(
90 'type' => 'input',
91 'size' => '10',
92 'max' => '20',
93 'eval' => 'datetime',
94 'checkbox' => '0',
95 'default' => '0'
96 )
97 ),
98 'endtime' => array(
99 'exclude' => 1,
100 'l10n_mode' => 'mergeIfNotBlank',
101 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.endtime',
102 'config' => array(
103 'type' => 'input',
104 'size' => '8',
105 'max' => '20',
106 'eval' => 'datetime',
107 'checkbox' => '0',
108 'default' => '0',
109 'range' => array(
110 'upper' => mktime(0, 0, 0, 1, 1, 2038),
111 )
112 )
113 ),
114 'title' => array(
115 'exclude' => 0,
116 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_category.title',
117 'config' => array(
118 'type' => 'input',
119 'width' => '200',
120 'eval' => 'trim,required'
121 )
122 ),
123 'description' => array(
124 'exclude' => 0,
125 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_category.description',
126 'config' => array(
127 'type' => 'text'
128 )
129 ),
130 'parent' => array(
131 'exclude' => 0,
132 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_category.parent',
133 'config' => array(
134 'minitems' => 0,
135 'maxitems' => 1,
136 'type' => 'select',
137 'renderMode' => 'tree',
138 'foreign_table' => 'sys_category',
139 'foreign_table_where' => ' AND sys_category.sys_language_uid IN (-1,0) ORDER BY sys_category.sorting ASC',
140 'treeConfig' => array(
141 'parentField' => 'parent'
142 )
143 )
144 ),
145 'items' => array(
146 'exclude' => 0,
147 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_category.items',
148 'config' => array(
149 'type' => 'group',
150 'internal_type' => 'db',
151 'allowed' => '*',
152 'MM' => 'sys_category_record_mm',
153 'show_thumbs' => FALSE
154 )
155 )
156 )
157 );
158 ?>