[TASK] Cleanup TCA
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Tests / Functional / Fixtures / Extensions / blog_example / Configuration / TCA / tx_blogexample_domain_model_post.php
1 <?php
2 return array(
3 'ctrl' => array(
4 'title' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post',
5 'label' => 'title',
6 'label_alt' => 'author',
7 'label_alt_force' => true,
8 'tstamp' => 'tstamp',
9 'crdate' => 'crdate',
10 'versioningWS' => true,
11 'versioning_followPages' => true,
12 'origUid' => 't3_origuid',
13 'languageField' => 'sys_language_uid',
14 'transOrigPointerField' => 'l18n_parent',
15 'transOrigDiffSourceField' => 'l18n_diffsource',
16 'delete' => 'deleted',
17 'enablecolumns' => array(
18 'disabled' => 'hidden'
19 ),
20 'iconfile' => 'EXT:blog_example/Resources/Public/Icons/icon_tx_blogexample_domain_model_post.gif'
21 ),
22 'interface' => array(
23 'showRecordFieldList' => 'title, date, author',
24 'maxDBListItems' => 100,
25 'maxSingleDBListItems' => 500
26 ),
27 'types' => array(
28 '1' => array('showitem' => 'sys_language_uid, hidden, blog, title, date, author, content, tags, comments, related_posts')
29 ),
30 'columns' => array(
31 'sys_language_uid' => array(
32 'exclude' => true,
33 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language',
34 'config' => array(
35 'type' => 'select',
36 'renderType' => 'selectSingle',
37 'foreign_table' => 'sys_language',
38 'foreign_table_where' => 'ORDER BY sys_language.title',
39 'items' => array(
40 array('LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1),
41 array('LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0)
42 ),
43 'default' => 0
44 )
45 ),
46 'l18n_parent' => array(
47 'displayCond' => 'FIELD:sys_language_uid:>:0',
48 'exclude' => true,
49 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent',
50 'config' => array(
51 'type' => 'select',
52 'renderType' => 'selectSingle',
53 'items' => array(
54 array('', 0),
55 ),
56 'foreign_table' => 'tx_blogexample_domain_model_post',
57 'foreign_table_where' => 'AND tx_blogexample_domain_model_post.uid=###REC_FIELD_l18n_parent### AND tx_blogexample_domain_model_post.sys_language_uid IN (-1,0)',
58 )
59 ),
60 'l18n_diffsource' => array(
61 'config'=>array(
62 'type' => 'passthrough',
63 'default' => ''
64 )
65 ),
66 'hidden' => array(
67 'exclude' => true,
68 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden',
69 'config' => array(
70 'type' => 'check'
71 )
72 ),
73 'blog' => array(
74 'exclude' => true,
75 'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.blog',
76 'config' => array(
77 'type' => 'select',
78 'renderType' => 'selectSingle',
79 'foreign_table' => 'tx_blogexample_domain_model_blog',
80 'maxitems' => 1,
81 )
82 ),
83 'title' => array(
84 'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.title',
85 'config' => array(
86 'type' => 'input',
87 'size' => 20,
88 'eval' => 'trim, required',
89 'max' => 256
90 )
91 ),
92 'date' => array(
93 'exclude' => true,
94 'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.date',
95 'config' => array(
96 'type' => 'input',
97 'size' => 12,
98 'eval' => 'datetime, required',
99 'default' => time()
100 )
101 ),
102 'author' => array(
103 'exclude' => true,
104 'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.author',
105 'config' => array(
106 'type' => 'select',
107 'renderType' => 'selectSingle',
108 'foreign_table' => 'tx_blogexample_domain_model_person',
109 'wizards' => array(
110 '_VERTICAL' => 1,
111 'edit' => array(
112 'type' => 'popup',
113 'title' => 'Edit',
114 'module' => array(
115 'name' => 'wizard_edit',
116 ),
117 'icon' => 'actions-open',
118 'popup_onlyOpenIfSelected' => 1,
119 'JSopenParams' => 'width=800,height=600,status=0,menubar=0,scrollbars=1',
120 ),
121 'add' => array(
122 'type' => 'script',
123 'title' => 'Create new',
124 'icon' => 'actions-add',
125 'params' => array(
126 'table'=>'tx_blogexample_domain_model_person',
127 'pid' => '###CURRENT_PID###',
128 'setValue' => 'prepend'
129 ),
130 'module' => array(
131 'name' => 'wizard_add',
132 ),
133 ),
134 )
135 )
136 ),
137 'content' => array(
138 'exclude' => true,
139 'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.content',
140 'config' => array(
141 'type' => 'text',
142 'rows' => 30,
143 'cols' => 80
144 )
145 ),
146 'tags' => array(
147 'exclude' => true,
148 'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.tags',
149 'config' => array(
150 'type' => 'inline',
151 'foreign_table' => 'tx_blogexample_domain_model_tag',
152 'MM' => 'tx_blogexample_post_tag_mm',
153 'maxitems' => 9999,
154 'appearance' => array(
155 'useCombination' => 1,
156 'useSortable' => 1,
157 'collapseAll' => 1,
158 'expandSingle' => 1,
159 )
160 )
161 ),
162 'comments' => array(
163 'exclude' => true,
164 'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.comments',
165 'config' => array(
166 'type' => 'inline',
167 'foreign_table' => 'tx_blogexample_domain_model_comment',
168 'foreign_field' => 'post',
169 'size' => 10,
170 'maxitems' => 9999,
171 'autoSizeMax' => 30,
172 'multiple' => 0,
173 'appearance' => array(
174 'collapseAll' => 1,
175 'expandSingle' => 1,
176 )
177 )
178 ),
179 'related_posts' => array(
180 'exclude' => true,
181 'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.related',
182 'config' => array(
183 'type' => 'select',
184 'renderType' => 'selectMultipleSideBySide',
185 'size' => 10,
186 'maxitems' => 9999,
187 'autoSizeMax' => 30,
188 'multiple' => 0,
189 'foreign_table' => 'tx_blogexample_domain_model_post',
190 'foreign_table_where' => 'AND ###THIS_UID### != tx_blogexample_domain_model_post.uid',
191 'MM' => 'tx_blogexample_post_post_mm',
192 'MM_opposite_field' => 'related_posts',
193 )
194 ),
195 )
196 );