-
Notifications
You must be signed in to change notification settings - Fork 1
/
rules_conditional.rules.inc
99 lines (98 loc) · 3.03 KB
/
rules_conditional.rules.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?php
/**
* @file
* Rules integration file.
*/
/**
* Implements hook_rules_plugin_info().
*/
function rules_conditional_rules_plugin_info() {
return array(
'conditional' => array(
'label' => t('Conditional', array(), array('context' => 'conditional rules')),
'class' => 'RulesConditional',
'embeddable' => 'RulesActionContainer',
'extenders' => array(
'RulesPluginUIInterface' => array(
'class' => 'RulesConditionalEmptyUI',
),
),
),
'if' => array(
'label' => t('If', array(), array('context' => 'conditional rules')),
'class' => 'RulesConditionalIf',
'embeddable' => 'RulesConditional',
'extenders' => array(
'RulesPluginUIInterface' => array(
'class' => 'RulesConditionalPredicateUI',
),
),
'import keys' => array('IF', 'ELSE IF'),
),
'else' => array(
'label' => t('Else', array(), array('context' => 'conditional rules')),
'class' => 'RulesConditionalElse',
'embeddable' => 'RulesConditional',
'conditional single' => TRUE,
'conditional depends' => array('if'),
'extenders' => array(
'RulesPluginUIInterface' => array(
'class' => 'RulesConditionalEmptyUI',
),
),
),
'switch' => array(
'label' => t('Switch', array(), array('context' => 'conditional rules')),
'class' => 'RulesConditionalSwitch',
'embeddable' => 'RulesActionContainer',
'extenders' => array(
'RulesPluginUIInterface' => array(
'class' => 'RulesConditionalPluginUI',
),
),
),
'case' => array(
'label' => t('Case', array(), array('context' => 'conditional rules')),
'class' => 'RulesConditionalCase',
'embeddable' => 'RulesConditionalSwitch',
'extenders' => array(
'RulesPluginUIInterface' => array(
'class' => 'RulesConditionalCaseUI',
),
),
),
'default case' => array(
'label' => t('Default case', array(), array('context' => 'conditional rules')),
'class' => 'RulesConditionalDefaultCase',
'embeddable' => 'RulesConditionalSwitch',
'conditional single' => TRUE,
'conditional depends' => array('case'),
'extenders' => array(
'RulesPluginUIInterface' => array(
'class' => 'RulesConditionalEmptyUI',
),
),
),
'while' => array(
'label' => t('While', array(), array('context' => 'conditional rules')),
'class' => 'RulesConditionalWhile',
'embeddable' => 'RulesActionContainer',
'extenders' => array(
'RulesPluginUIInterface' => array(
'class' => 'RulesConditionalWhileUI',
),
),
),
'rule condition set' => array(
'label' => t('Condition set (rule)', array(), array('context' => 'conditional rules')),
'class' => 'RuleConditionSet',
'embeddable' => FALSE,
'component' => TRUE,
'extenders' => array(
'RulesPluginUIInterface' => array(
'class' => 'RuleConditionSetUI',
),
),
),
);
}