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