13fe682da33af7c598b6a16ad9a9c876edacac6f
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Tests / Functional / Fixtures / Extensions / blog_example / Configuration / TCA / Post.php
1 <?php
2 defined('TYPO3_MODE') or die();
3
4 $TCA['tx_blogexample_domain_model_post'] = array(
5 'ctrl' => $TCA['tx_blogexample_domain_model_post']['ctrl'],
6 'interface' => array(
7 'showRecordFieldList' => 'title, date, author',
8 'maxDBListItems' => 100,
9 'maxSingleDBListItems' => 500
10 ),
11 'types' => array(
12 '1' => array('showitem' => 'sys_language_uid, hidden, blog, title, date, author, content, tags, comments, related_posts')
13 ),
14 'columns' => array(
15 'sys_language_uid' => array(
16 'exclude' => 1,
17 'label' => 'LLL:EXT:lang/locallang_general.php:LGL.language',
18 'config' => array(
19 'type' => 'select',
20 'renderType' => 'selectSingle',
21 'foreign_table' => 'sys_language',
22 'foreign_table_where' => 'ORDER BY sys_language.title',
23 'items' => array(
24 array('LLL:EXT:lang/locallang_general.php:LGL.allLanguages', -1),
25 array('LLL:EXT:lang/locallang_general.php:LGL.default_value', 0)
26 ),
27 'default' => 0
28 )
29 ),
30 'l18n_parent' => array(
31 'displayCond' => 'FIELD:sys_language_uid:>:0',
32 'exclude' => 1,
33 'label' => 'LLL:EXT:lang/locallang_general.php:LGL.l18n_parent',
34 'config' => array(
35 'type' => 'select',
36 'renderType' => 'selectSingle',
37 'items' => array(
38 array('', 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' => array(
45 'config'=>array(
46 'type' => 'passthrough',
47 'default' => ''
48 )
49 ),
50 'hidden' => array(
51 'exclude' => 1,
52 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden',
53 'config' => array(
54 'type' => 'check'
55 )
56 ),
57 'blog' => array(
58 'exclude' => 1,
59 'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.blog',
60 'config' => array(
61 'type' => 'select',
62 'renderType' => 'selectSingle',
63 'foreign_table' => 'tx_blogexample_domain_model_blog',
64 'maxitems' => 1,
65 )
66 ),
67 'title' => array(
68 'exclude' => 0,
69 'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.title',
70 'config' => array(
71 'type' => 'input',
72 'size' => 20,
73 'eval' => 'trim, required',
74 'max' => 256
75 )
76 ),
77 'date' => array(
78 'exclude' => 1,
79 'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.date',
80 'config' => array(
81 'type' => 'input',
82 'size' => 12,
83 'eval' => 'datetime, required',
84 'default' => time()
85 )
86 ),
87 'author' => array(
88 'exclude' => 1,
89 'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.author',
90 'config' => array(
91 'type' => 'select',
92 'renderType' => 'selectSingle',
93 'foreign_table' => 'tx_blogexample_domain_model_person',
94 'wizards' => array(
95 '_VERTICAL' => 1,
96 'edit' => array(
97 'type' => 'popup',
98 'title' => 'Edit',
99 'script' => 'wizard_edit.php',
100 'icon' => 'EXT:backend/Resources/Public/Images/FormFieldWizard/wizard_edit.gif',
101 'popup_onlyOpenIfSelected' => 1,
102 'JSopenParams' => 'width=800,height=600,status=0,menubar=0,scrollbars=1',
103 ),
104 'add' => array(
105 'type' => 'script',
106 'title' => 'Create new',
107 'icon' => 'EXT:backend/Resources/Public/Images/FormFieldWizard/wizard_add.gif',
108 'params' => array(
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' => array(
119 'exclude' => 1,
120 'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.content',
121 'config' => array(
122 'type' => 'text',
123 'rows' => 30,
124 'cols' => 80
125 )
126 ),
127 'tags' => array(
128 'exclude' => 1,
129 'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.tags',
130 'config' => array(
131 'type' => 'inline',
132 'foreign_table' => 'tx_blogexample_domain_model_tag',
133 'MM' => 'tx_blogexample_post_tag_mm',
134 'maxitems' => 9999,
135 'appearance' => array(
136 'useCombination' => 1,
137 'useSortable' => 1,
138 'collapseAll' => 1,
139 'expandSingle' => 1,
140 )
141 )
142 ),
143 'comments' => array(
144 'exclude' => 1,
145 'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.comments',
146 'config' => array(
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' => array(
155 'collapseAll' => 1,
156 'expandSingle' => 1,
157 )
158 )
159 ),
160 'related_posts' => array(
161 'exclude' => 1,
162 'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post.related',
163 'config' => array(
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 );