[TASK] TCA cleanup for TYPO3 7.6
[TYPO3CMS/Extensions/powermailCond.git] / Configuration / TCA / tx_powermailcond_domain_model_condition.php
1 <?php
2 return array(
3 'ctrl' => array(
4 'title' => 'LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_conditions',
5 'label' => 'title',
6 'tstamp' => 'tstamp',
7 'crdate' => 'crdate',
8 'cruser_id' => 'cruser_id',
9 'languageField' => 'sys_language_uid',
10 'sortby' => 'sorting',
11 'delete' => 'deleted',
12 'enablecolumns' => array(
13 'disabled' => 'hidden',
14 'starttime' => 'starttime',
15 'endtime' => 'endtime',
16 ),
17 'iconfile' => 'EXT:powermail_cond/Resources/Public/Icons/icon_tx_powermailcond_conditions.gif'
18 ),
19 'interface' => array(
20 'showRecordFieldList' => 'sys_language_uid,l18n_parent,l18n_diffsource,hidden,starttime,
21 endtime,conditioncontainer,title,target_field,actions,filter_select_field,rules,conjunction',
22 ),
23 'types' => array(
24 '1' => array('showitem' => 'conditioncontainer, title, target_field, actions, filter_select_field, conjunction, rules'),
25 ),
26 'palettes' => array(
27 '1' => array(),
28 ),
29 'columns' => array(
30 'sys_language_uid' => array(
31 'exclude' => 1,
32 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.language',
33 'config' => array(
34 'type' => 'select',
35 'renderType' => 'selectSingle',
36 'foreign_table' => 'sys_language',
37 'foreign_table_where' => 'ORDER BY sys_language.title',
38 'items' => array(
39 array('LLL:EXT:lang/locallang_general.xml:LGL.allLanguages', -1),
40 array('LLL:EXT:lang/locallang_general.xml:LGL.default_value', 0)
41 ),
42 ),
43 ),
44 'l18n_parent' => array (
45 'displayCond' => 'FIELD:sys_language_uid:>:0',
46 'exclude' => 1,
47 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.l18n_parent',
48 'config' => array (
49 'type' => 'select',
50 'renderType' => 'selectSingle',
51 'items' => array (
52 array('', 0),
53 ),
54 'foreign_table' => 'tx_powermailcond_conditions',
55 'foreign_table_where' =>
56 'AND tx_powermailcond_conditions.pid=###CURRENT_PID### AND tx_powermailcond_conditions.sys_language_uid IN (-1,0)',
57 )
58 ),
59 'l18n_diffsource' => array (
60 'config' => array (
61 'type' => 'passthrough'
62 )
63 ),
64 'hidden' => array(
65 'exclude' => 1,
66 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden',
67 'config' => array(
68 'type' => 'check',
69 ),
70 ),
71 'starttime' => array(
72 'exclude' => 1,
73 'l10n_mode' => 'mergeIfNotBlank',
74 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.starttime',
75 'config' => array(
76 'type' => 'input',
77 'size' => 13,
78 'max' => 20,
79 'eval' => 'datetime',
80 'checkbox' => 0,
81 'default' => 0,
82 'range' => array(
83 'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
84 ),
85 ),
86 ),
87 'endtime' => array(
88 'exclude' => 1,
89 'l10n_mode' => 'mergeIfNotBlank',
90 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.endtime',
91 'config' => array(
92 'type' => 'input',
93 'size' => 13,
94 'max' => 20,
95 'eval' => 'datetime',
96 'checkbox' => 0,
97 'default' => 0,
98 'range' => array(
99 'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
100 ),
101 ),
102 ),
103 'title' => Array (
104 'exclude' => 1,
105 'label' => 'LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_conditions.title',
106 'config' => Array (
107 'type' => 'input',
108 'size' => '30',
109 )
110 ),
111 'rules' => array(
112 'exclude' => 1,
113 'label' => 'LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_conditions.rules',
114 'config' => array(
115 'type' => 'inline',
116 'foreign_table' => 'tx_powermailcond_domain_model_rule',
117 'foreign_table_where' =>
118 'AND tx_powermailcond_domain_model_rule.pid=###CURRENT_PID### ORDER BY tx_powermailcond_domain_model_rule.sorting',
119 'foreign_field' => 'conditions',
120 'maxitems' => 99,
121 'appearance' => array(
122 'collapseAll' => 1,
123 'expandSingle' => 1,
124 'useSortable' => 1,
125 'newRecordLinkAddTitle' => 1,
126 'newRecordLinkPosition' => 'both',
127 ),
128 ),
129 ),
130 'conjunction' => array(
131 'exclude' => 1,
132 'label' => 'LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_conditions.conjunction',
133 'config' => array(
134 'type' => 'select',
135 'renderType' => 'selectSingle',
136 'items' => array(
137 // OR
138 array(
139 'LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_conditions.conjunction.I.1',
140 \In2code\PowermailCond\Domain\Model\Condition::CONJUNCTION_OR
141 ),
142
143 // AND
144 array(
145 'LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_conditions.conjunction.I.0',
146 \In2code\PowermailCond\Domain\Model\Condition::CONJUNCTION_AND
147 ),
148 ),
149 'size' => 1,
150 'maxitems' => 1,
151 ),
152 ),
153 'target_field' => array(
154 'exclude' => 1,
155 'label' => 'LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_conditions.targetField',
156 'config' => array(
157 'type' => 'select',
158 'renderType' => 'selectSingle',
159 'items' => array(
160 array(
161 'LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_conditions.targetField.I.0',
162 '0'
163 ),
164 ),
165 'itemsProcFunc' => 'In2code\PowermailCond\UserFunc\GetPowermailFields->getFields',
166 'itemsProcFunc_addFieldsets' => TRUE,
167 'size' => 1,
168 'maxitems' => 1,
169 'eval' => 'required'
170 ),
171 ),
172 'actions' => array(
173 'exclude' => 1,
174 'label' => 'LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_conditions.action',
175 'config' => array(
176 'type' => 'select',
177 'renderType' => 'selectSingle',
178 'items' => array(
179 // title main
180 array(
181 'LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_conditions.action.I.main',
182 '--div--'
183 ),
184
185 // hide
186 array(
187 'LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_conditions.action.I.0',
188 \In2code\PowermailCond\Domain\Model\Condition::ACTION_HIDE
189 ),
190
191 // unhide
192 array(
193 'LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_conditions.action.I.1',
194 \In2code\PowermailCond\Domain\Model\Condition::ACTION_UN_HIDE
195 ),
196
197 // title additional
198 array(
199 'LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_conditions.action.I.additional',
200 '--div--'
201 ),
202 ),
203 'size' => 1,
204 'maxitems' => 1,
205 ),
206 ),
207 'conditioncontainer' => array(
208 'l10n_mode' => 'noCopy',
209 'exclude' => 1,
210 'label' => 'LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_conditions.conditioncontainer',
211 'config' => array(
212 'type' => 'select',
213 'renderType' => 'selectSingle',
214 'items' => array(
215 array(
216 '',
217 0
218 ),
219 ),
220 'foreign_table' => 'tx_powermailcond_domain_model_conditioncontainer',
221 'foreign_table_where' =>
222 'AND tx_powermailcond_domain_model_conditioncontainer.pid=###CURRENT_PID###
223 AND tx_powermailcond_domain_model_conditioncontainer.sys_language_uid IN (-1,###REC_FIELD_sys_language_uid###)',
224 ),
225 ),
226 ),
227 );