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