[!!!][TASK] Improve flex and TCA handling in FormEngine
[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 [
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, content, tags, comments, related_posts']
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.xml: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 'size' => 12,
97 'eval' => 'datetime, required',
98 'default' => time()
99 ]
100 ],
101 'author' => [
102 'exclude' => true,
103 'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.author',
104 'config' => [
105 'type' => 'select',
106 'renderType' => 'selectSingle',
107 'foreign_table' => 'tx_blogexample_domain_model_person',
108 'wizards' => [
109 '_VERTICAL' => 1,
110 'edit' => [
111 'type' => 'popup',
112 'title' => 'Edit',
113 'module' => [
114 'name' => 'wizard_edit',
115 ],
116 'icon' => 'actions-open',
117 'popup_onlyOpenIfSelected' => 1,
118 'JSopenParams' => 'width=800,height=600,status=0,menubar=0,scrollbars=1',
119 ],
120 'add' => [
121 'type' => 'script',
122 'title' => 'Create new',
123 'icon' => 'actions-add',
124 'params' => [
125 'table'=>'tx_blogexample_domain_model_person',
126 'pid' => '###CURRENT_PID###',
127 'setValue' => 'prepend'
128 ],
129 'module' => [
130 'name' => 'wizard_add',
131 ],
132 ],
133 ]
134 ]
135 ],
136 'content' => [
137 'exclude' => true,
138 'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.content',
139 'config' => [
140 'type' => 'text',
141 'rows' => 30,
142 'cols' => 80
143 ]
144 ],
145 'tags' => [
146 'exclude' => true,
147 'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.tags',
148 'config' => [
149 'type' => 'inline',
150 'foreign_table' => 'tx_blogexample_domain_model_tag',
151 'MM' => 'tx_blogexample_post_tag_mm',
152 'appearance' => [
153 'useCombination' => 1,
154 'useSortable' => 1,
155 'collapseAll' => 1,
156 'expandSingle' => 1,
157 ]
158 ]
159 ],
160 'comments' => [
161 'exclude' => true,
162 'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.comments',
163 'config' => [
164 'type' => 'inline',
165 'foreign_table' => 'tx_blogexample_domain_model_comment',
166 'foreign_field' => 'post',
167 'size' => 10,
168 'autoSizeMax' => 30,
169 'multiple' => 0,
170 'appearance' => [
171 'collapseAll' => 1,
172 'expandSingle' => 1,
173 ]
174 ]
175 ],
176 'related_posts' => [
177 'exclude' => true,
178 'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.related',
179 'config' => [
180 'type' => 'select',
181 'renderType' => 'selectMultipleSideBySide',
182 'size' => 10,
183 'autoSizeMax' => 30,
184 'multiple' => 0,
185 'foreign_table' => 'tx_blogexample_domain_model_post',
186 'foreign_table_where' => 'AND ###THIS_UID### != tx_blogexample_domain_model_post.uid',
187 'MM' => 'tx_blogexample_post_post_mm',
188 'MM_opposite_field' => 'related_posts',
189 ]
190 ],
191 ]
192 ];