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