[TASK] Cleanup TCA
[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 'descriptionColumn' => 'description',
6 'label' => 'title',
7 'tstamp' => 'tstamp',
8 'crdate' => 'crdate',
9 'cruser_id' => 'cruser_id',
10 'delete' => 'deleted',
11 'sortby' => 'sorting',
12 'versioningWS' => true,
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 'security' => array(
29 'ignoreRootLevelRestriction' => true,
30 )
31 ),
32 'interface' => array(
33 'showRecordFieldList' => 'title,description'
34 ),
35 'types' => array(
36 '1' => array(
37 'showitem' => 'title, --palette--;;1, parent, description,
38 --div--;LLL:EXT:lang/locallang_tca.xlf:sys_category.tabs.items, items,
39 --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime',
40 ),
41 ),
42 'palettes' => array(
43 '1' => array('showitem' => 'sys_language_uid, l10n_parent, hidden')
44 ),
45 'columns' => array(
46 't3ver_label' => array(
47 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel',
48 'config' => array(
49 'type' => 'input',
50 'size' => 30,
51 'max' => 30
52 )
53 ),
54 'sys_language_uid' => array(
55 'exclude' => true,
56 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language',
57 'config' => array(
58 'type' => 'select',
59 'renderType' => 'selectSingle',
60 'foreign_table' => 'sys_language',
61 'foreign_table_where' => 'ORDER BY sys_language.title',
62 'items' => array(
63 array('LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1),
64 array('LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0)
65 ),
66 'default' => 0,
67 'showIconTable' => true,
68 )
69 ),
70 'l10n_parent' => array(
71 'displayCond' => 'FIELD:sys_language_uid:>:0',
72 'exclude' => true,
73 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent',
74 'config' => array(
75 'type' => 'select',
76 'renderType' => 'selectSingle',
77 'items' => array(
78 array('', 0)
79 ),
80 'foreign_table' => 'sys_category',
81 'foreign_table_where' => 'AND sys_category.uid=###REC_FIELD_l10n_parent### AND sys_category.sys_language_uid IN (-1,0)',
82 'default' => 0
83 )
84 ),
85 'l10n_diffsource' => array(
86 'config' => array(
87 'type' => 'passthrough',
88 'default' => ''
89 )
90 ),
91 'hidden' => array(
92 'exclude' => true,
93 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden',
94 'config' => array(
95 'type' => 'check'
96 )
97 ),
98 'starttime' => array(
99 'exclude' => true,
100 'l10n_mode' => 'mergeIfNotBlank',
101 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.starttime',
102 'config' => array(
103 'type' => 'input',
104 'size' => 10,
105 'eval' => 'datetime',
106 'default' => 0
107 )
108 ),
109 'endtime' => array(
110 'exclude' => true,
111 'l10n_mode' => 'mergeIfNotBlank',
112 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.endtime',
113 'config' => array(
114 'type' => 'input',
115 'size' => 8,
116 'eval' => 'datetime',
117 'default' => 0,
118 'range' => array(
119 'upper' => mktime(0, 0, 0, 1, 1, 2038),
120 )
121 )
122 ),
123 'title' => array(
124 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_category.title',
125 'config' => array(
126 'type' => 'input',
127 'width' => 200,
128 'eval' => 'trim,required'
129 )
130 ),
131 'description' => array(
132 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_category.description',
133 'config' => array(
134 'type' => 'text',
135 'default' => '',
136 )
137 ),
138 'parent' => array(
139 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_category.parent',
140 'config' => array(
141 'minitems' => 0,
142 'maxitems' => 1,
143 'type' => 'select',
144 'renderType' => 'selectTree',
145 'foreign_table' => 'sys_category',
146 'foreign_table_where' => ' AND sys_category.sys_language_uid IN (-1,0) ORDER BY sys_category.sorting ASC',
147 'treeConfig' => array(
148 'parentField' => 'parent',
149 'appearance' => array(
150 'expandAll' => true,
151 'showHeader' => true,
152 'maxLevels' => 99,
153 ),
154 ),
155 'default' => 0
156 )
157 ),
158 'items' => array(
159 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_category.items',
160 'config' => array(
161 'type' => 'group',
162 'internal_type' => 'db',
163 'allowed' => '*',
164 'MM' => 'sys_category_record_mm',
165 'MM_oppositeUsage' => array(),
166 'size' => 10,
167 'show_thumbs' => false
168 )
169 )
170 )
171 );