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