Working Copy
[TYPO3CMS/Extensions/powermailCond.git] / Configuration / TCA / Rules.php
1 <?php
2 if (!defined ('TYPO3_MODE')) {
3 die ('Access denied.');
4 }
5
6 $TCA['tx_powermailcond_rules'] = array (
7 'ctrl' => $TCA['tx_powermailcond_rules']['ctrl'],
8 'interface' => array (
9 'showRecordFieldList' => 'hidden,startField,ops,condstring,equalField'
10 ),
11 'types' => array (
12 '0' => array('showitem' => '--palette--;;1,startField,--palette--;;2')
13 ),
14 'palettes' => array (
15 '1' => array('showitem' => 'title, hidden'),
16 '2' => array('showitem' => 'ops,condstring,equalField')
17 ),
18 'feInterface' => $TCA['tx_powermailcond_rules']['feInterface'],
19 'columns' => array (
20 'hidden' => array (
21 'exclude' => 1,
22 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden',
23 'config' => array (
24 'type' => 'check',
25 'default' => '0'
26 )
27 ),
28 'title' => Array (
29 'exclude' => 1,
30 'label' => 'LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_rules.title',
31 'config' => Array (
32 'type' => 'input',
33 'size' => '30',
34 )
35 ),
36 'startField' => Array (
37 'exclude' => 1,
38 'label' => 'LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_rules.startField',
39 'config' => Array (
40 'type' => 'select',
41 'items' => Array (
42 Array('LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_rules.startField.I.0', '0'),
43 ),
44 'itemsProcFunc' => 'tx_powermailcond_fields_be->fieldname',
45 'itemsProcFuncValue' => '"text","textarea","select","radio","check"', // allow only this types of fields in selector
46 'size' => 1,
47 'maxitems' => 1,
48 'eval' => 'required'
49 )
50 ),
51 'ops' => Array (
52 'exclude' => 1,
53 'label' => 'LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_rules.operator',
54 'config' => Array (
55 'type' => 'select',
56 'items' => Array (
57 //Array('', ''), // empty
58 Array('LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_rules.operator.I.operators', '--div--'), // title operators
59 Array('LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_rules.operator.I.0', '0'), // is set
60 Array('LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_rules.operator.I.1', '1'), // is not set
61 Array('LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_rules.operator.I.operatorsComparisonValue', '--div--'), // title operatorsComparisonValue
62 Array('LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_rules.operator.I.2', '2'), // contains
63 Array('LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_rules.operator.I.3', '3'), // contains not
64 Array('LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_rules.operator.I.4', '4'), // is
65 Array('LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_rules.operator.I.5', '5'), // is not
66 Array('LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_rules.operator.I.6', '6'), // is greater than
67 Array('LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_rules.operator.I.7', '7'), // is less than
68 Array('LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_rules.operator.I.operatorsComparisonField', '--div--'), // title operatorsComparisonField
69 Array('LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_rules.operator.I.8', '8'), // contains value from field
70 Array('LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_rules.operator.I.9', '9'), // contains not value from field
71 ),
72 'size' => 1,
73 'maxitems' => 1
74 )
75 ),
76 'condstring' => Array (
77 'exclude' => 1,
78 'label' => 'LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_rules.condstring',
79 'config' => Array (
80 'type' => 'text',
81 'cols' => '30',
82 'rows' => '2',
83 ),
84 'displayCond' => 'FIELD:ops:IN:2,3,4,5,6,7' // show only if ops value is greater than 1
85 ),
86 'equalField' => Array (
87 'exclude' => 1,
88 'label' => 'LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_rules.equalField',
89 'config' => Array (
90 'type' => 'select',
91 'items' => Array (
92 Array('LLL:EXT:powermail_cond/Resources/Private/Language/locallang_db.xml:tx_powermailcond_rules.equalField.I.0', '0'),
93 ),
94 'itemsProcFunc' => 'tx_powermailcond_fields_be->fieldname',
95 'itemsProcFuncValue' => '"text","textarea","select","radio"', // allow only this types of fields in selector
96 'size' => 1,
97 'maxitems' => 1
98 ),
99 'displayCond' => 'FIELD:ops:IN:8,9' // show only if ops value is greater than 1
100 ),
101 ),
102 );
103
104 ?>