[TASK] Cleanup TCA select field configuration
[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' => 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 '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' => 1,
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 )
68 ),
69 'l10n_parent' => array(
70 'displayCond' => 'FIELD:sys_language_uid:>:0',
71 'exclude' => 1,
72 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent',
73 'config' => array(
74 'type' => 'select',
75 'renderType' => 'selectSingle',
76 'items' => array(
77 array('', 0)
78 ),
79 'foreign_table' => 'sys_category',
80 'foreign_table_where' => 'AND sys_category.uid=###REC_FIELD_l10n_parent### AND sys_category.sys_language_uid IN (-1,0)',
81 'default' => 0
82 )
83 ),
84 'l10n_diffsource' => array(
85 'config' => array(
86 'type' => 'passthrough',
87 'default' => ''
88 )
89 ),
90 'hidden' => array(
91 'exclude' => 1,
92 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden',
93 'config' => array(
94 'type' => 'check'
95 )
96 ),
97 'starttime' => array(
98 'exclude' => 1,
99 'l10n_mode' => 'mergeIfNotBlank',
100 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.starttime',
101 'config' => array(
102 'type' => 'input',
103 'size' => '10',
104 'eval' => 'datetime',
105 'checkbox' => '0',
106 'default' => '0'
107 )
108 ),
109 'endtime' => array(
110 'exclude' => 1,
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 'checkbox' => '0',
118 'default' => '0',
119 'range' => array(
120 'upper' => mktime(0, 0, 0, 1, 1, 2038),
121 )
122 )
123 ),
124 'title' => array(
125 'exclude' => 0,
126 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_category.title',
127 'config' => array(
128 'type' => 'input',
129 'width' => '200',
130 'eval' => 'trim,required'
131 )
132 ),
133 'description' => array(
134 'exclude' => 0,
135 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_category.description',
136 'config' => array(
137 'type' => 'text',
138 'default' => '',
139 )
140 ),
141 'parent' => array(
142 'exclude' => 0,
143 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_category.parent',
144 'config' => array(
145 'minitems' => 0,
146 'maxitems' => 1,
147 'type' => 'select',
148 'renderType' => 'selectTree',
149 'foreign_table' => 'sys_category',
150 'foreign_table_where' => ' AND sys_category.sys_language_uid IN (-1,0) ORDER BY sys_category.sorting ASC',
151 'treeConfig' => array(
152 'parentField' => 'parent',
153 'appearance' => array(
154 'expandAll' => TRUE,
155 'showHeader' => TRUE,
156 'maxLevels' => 99,
157 ),
158 ),
159 'default' => 0
160 )
161 ),
162 'items' => array(
163 'exclude' => 0,
164 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_category.items',
165 'config' => array(
166 'type' => 'group',
167 'internal_type' => 'db',
168 'allowed' => '*',
169 'MM' => 'sys_category_record_mm',
170 'MM_oppositeUsage' => array(),
171 'size' => 10,
172 'show_thumbs' => FALSE
173 )
174 )
175 )
176 );