TYPO3 CMS  TYPO3_8-7
tx_blogexample_domain_model_post.php
Go to the documentation of this file.
1 <?php
2 return [
3  'ctrl' => [
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  'origUid' => 't3_origuid',
12  'languageField' => 'sys_language_uid',
13  'transOrigPointerField' => 'l18n_parent',
14  'transOrigDiffSourceField' => 'l18n_diffsource',
15  'delete' => 'deleted',
16  'enablecolumns' => [
17  'disabled' => 'hidden'
18  ],
19  'iconfile' => 'EXT:blog_example/Resources/Public/Icons/icon_tx_blogexample_domain_model_post.gif'
20  ],
21  'interface' => [
22  'showRecordFieldList' => 'title, date, author',
23  'maxDBListItems' => 100,
24  'maxSingleDBListItems' => 500
25  ],
26  'types' => [
27  '1' => ['showitem' => 'sys_language_uid, hidden, blog, title, date, author, second_author, content, tags, comments, related_posts, additional_name, additional_info, additional_comments']
28  ],
29  'columns' => [
30  'sys_language_uid' => [
31  'exclude' => true,
32  'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.language',
33  'config' => [
34  'type' => 'select',
35  'renderType' => 'selectSingle',
36  'foreign_table' => 'sys_language',
37  'foreign_table_where' => 'ORDER BY sys_language.title',
38  'items' => [
39  ['LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1],
40  ['LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0]
41  ],
42  'default' => 0
43  ]
44  ],
45  'l18n_parent' => [
46  'displayCond' => 'FIELD:sys_language_uid:>:0',
47  'exclude' => true,
48  'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
49  'config' => [
50  'type' => 'select',
51  'renderType' => 'selectSingle',
52  'items' => [
53  ['', 0],
54  ],
55  'foreign_table' => 'tx_blogexample_domain_model_post',
56  '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)',
57  ]
58  ],
59  'l18n_diffsource' => [
60  'config'=>[
61  'type' => 'passthrough',
62  'default' => ''
63  ]
64  ],
65  'hidden' => [
66  'exclude' => true,
67  'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.hidden',
68  'config' => [
69  'type' => 'check'
70  ]
71  ],
72  'blog' => [
73  'exclude' => true,
74  'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.blog',
75  'config' => [
76  'type' => 'select',
77  'renderType' => 'selectSingle',
78  'foreign_table' => 'tx_blogexample_domain_model_blog',
79  'maxitems' => 1,
80  ]
81  ],
82  'title' => [
83  'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.title',
84  'config' => [
85  'type' => 'input',
86  'size' => 20,
87  'eval' => 'trim, required',
88  'max' => 256
89  ]
90  ],
91  'date' => [
92  'exclude' => true,
93  'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.date',
94  'config' => [
95  'type' => 'input',
96  'renderType' => 'inputDateTime',
97  'size' => 12,
98  'eval' => 'datetime, required',
99  'default' => time()
100  ]
101  ],
102  'author' => [
103  'exclude' => true,
104  'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.author',
105  'config' => [
106  'type' => 'select',
107  'renderType' => 'selectSingle',
108  'foreign_table' => 'tx_blogexample_domain_model_person',
109  'fieldControl' => [
110  'editPopup' => [
111  'disabled' => false,
112  ],
113  'addRecord' => [
114  'disabled' => false,
115  'options' => [
116  'setValue' => 'prepend',
117  ],
118  ],
119  ],
120  ],
121  ],
122  'second_author' => [
123  'exclude' => true,
124  'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.second_author',
125  'config' => [
126  'type' => 'group',
127  'internal_type' => 'db',
128  'allowed' => 'tx_blogexample_domain_model_person',
129  'foreign_table' => 'tx_blogexample_domain_model_person',
130  'maxitems' => 1,
131  'fieldControl' => [
132  'editPopup' => [
133  'disabled' => false,
134  ],
135  'addRecord' => [
136  'disabled' => false,
137  ],
138  'listModule' => [
139  'disabled' => false,
140  ],
141  ],
142  ],
143  ],
144  'reviewer' => [
145  'exclude' => true,
146  'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.reviewer',
147  'config' => [
148  'type' => 'select',
149  'renderType' => 'selectSingle',
150  'foreign_table' => 'tx_blogexample_domain_model_person',
151  'fieldControl' => [
152  'editPopup' => [
153  'disabled' => false,
154  ],
155  'addRecord' => [
156  'disabled' => false,
157  'options' => [
158  'setValue' => 'prepend',
159  ],
160  ],
161  ],
162  ],
163  ],
164  'content' => [
165  'exclude' => true,
166  'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.content',
167  'config' => [
168  'type' => 'text',
169  'rows' => 30,
170  'cols' => 80
171  ]
172  ],
173  'tags' => [
174  'exclude' => true,
175  'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.tags',
176  'config' => [
177  'type' => 'inline',
178  'foreign_table' => 'tx_blogexample_domain_model_tag',
179  'MM' => 'tx_blogexample_post_tag_mm',
180  'appearance' => [
181  'useCombination' => 1,
182  'useSortable' => 1,
183  'collapseAll' => 1,
184  'expandSingle' => 1,
185  ]
186  ]
187  ],
188  'comments' => [
189  'exclude' => true,
190  'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.comments',
191  'config' => [
192  'type' => 'inline',
193  'foreign_table' => 'tx_blogexample_domain_model_comment',
194  'foreign_field' => 'post',
195  'size' => 10,
196  'autoSizeMax' => 30,
197  'multiple' => 0,
198  'appearance' => [
199  'collapseAll' => 1,
200  'expandSingle' => 1,
201  ]
202  ]
203  ],
204  'related_posts' => [
205  'exclude' => true,
206  'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.related',
207  'config' => [
208  'type' => 'select',
209  'renderType' => 'selectMultipleSideBySide',
210  'size' => 10,
211  'autoSizeMax' => 30,
212  'multiple' => 0,
213  'foreign_table' => 'tx_blogexample_domain_model_post',
214  'foreign_table_where' => 'AND ###THIS_UID### != tx_blogexample_domain_model_post.uid',
215  'MM' => 'tx_blogexample_post_post_mm',
216  'MM_opposite_field' => 'related_posts',
217  ]
218  ],
219  'additional_name' => [
220  'exclude' => true,
221  'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.additional_name',
222  'config' => [
223  'type' => 'inline', // this will store the info uid in the additional_name field (CSV)
224  'foreign_table' => 'tx_blogexample_domain_model_info',
225  'minitems' => 0,
226  'maxitems' => 1,
227  ],
228  ],
229  'additional_info' => [
230  'exclude' => true,
231  'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.additional_info',
232  'config' => [
233  'type' => 'inline', // this will store the post uid in the post field of the info table
234  'foreign_table' => 'tx_blogexample_domain_model_info',
235  'foreign_field' => 'post',
236  'minitems' => 0,
237  'maxitems' => 1,
238  ],
239  ],
240  'additional_comments' => [
241  'exclude' => true,
242  'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.additional_comments',
243  'config' => [
244  'type' => 'inline', // this will store the comments uids in the additional_comments field (CSV)
245  'foreign_table' => 'tx_blogexample_domain_model_comment',
246  'minitems' => 0,
247  'maxitems' => 200,
248  ],
249  ],
250  ]
251 ];