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