Révision 950416da
Ajouté par Assos Assos il y a plus de 5 ans
drupal7/sites/all/modules/rules/modules/taxonomy.rules.inc | ||
---|---|---|
1 | 1 |
<?php |
2 | 2 |
|
3 | 3 |
/** |
4 |
* @file rules integration for the taxonomy_term module |
|
4 |
* @file |
|
5 |
* Rules integration for the taxonomy_term module. |
|
5 | 6 |
* |
6 | 7 |
* @addtogroup rules |
8 |
* |
|
7 | 9 |
* @{ |
8 | 10 |
*/ |
9 | 11 |
|
... | ... | |
33 | 35 |
'label' => t('After updating an existing term'), |
34 | 36 |
'variables' => array( |
35 | 37 |
'term' => array('type' => 'taxonomy_term', 'label' => t('updated term')), |
36 |
'term_unchanged' => array('type' => 'taxonomy_term', 'label' => t('unchanged term'), 'handler' => 'rules_events_entity_unchanged'), |
|
38 |
'term_unchanged' => array( |
|
39 |
'type' => 'taxonomy_term', |
|
40 |
'label' => t('unchanged term'), |
|
41 |
'handler' => 'rules_events_entity_unchanged', |
|
42 |
), |
|
37 | 43 |
), |
38 | 44 |
), |
39 | 45 |
'taxonomy_term_presave' => $defaults_term + array( |
40 | 46 |
'label' => t('Before saving a taxonomy term'), |
41 | 47 |
'variables' => array( |
42 |
'term' => array('type' => 'taxonomy_term', 'label' => t('saved term'), 'skip save' => TRUE), |
|
43 |
'term_unchanged' => array('type' => 'taxonomy_term', 'label' => t('unchanged term'), 'handler' => 'rules_events_entity_unchanged'), |
|
48 |
'term' => array( |
|
49 |
'type' => 'taxonomy_term', |
|
50 |
'label' => t('saved term'), |
|
51 |
'skip save' => TRUE, |
|
52 |
), |
|
53 |
'term_unchanged' => array( |
|
54 |
'type' => 'taxonomy_term', |
|
55 |
'label' => t('unchanged term'), |
|
56 |
'handler' => 'rules_events_entity_unchanged', |
|
57 |
), |
|
44 | 58 |
), |
45 | 59 |
), |
46 | 60 |
'taxonomy_term_delete' => $defaults_term + array( |
... | ... | |
58 | 72 |
'taxonomy_vocabulary_update' => $defaults_vocab + array( |
59 | 73 |
'label' => t('After updating an existing vocabulary'), |
60 | 74 |
'variables' => array( |
61 |
'vocabulary' => array('type' => 'taxonomy_vocabulary', 'label' => t('updated vocabulary')), |
|
62 |
'vocabulary_unchanged' => array('type' => 'taxonomy_vocabulary', 'label' => t('unchanged vocabulary'), 'handler' => 'rules_events_entity_unchanged'), |
|
75 |
'vocabulary' => array( |
|
76 |
'type' => 'taxonomy_vocabulary', |
|
77 |
'label' => t('updated vocabulary'), |
|
78 |
), |
|
79 |
'vocabulary_unchanged' => array( |
|
80 |
'type' => 'taxonomy_vocabulary', |
|
81 |
'label' => t('unchanged vocabulary'), |
|
82 |
'handler' => 'rules_events_entity_unchanged', |
|
83 |
), |
|
63 | 84 |
), |
64 | 85 |
), |
65 | 86 |
'taxonomy_vocabulary_presave' => $defaults_vocab + array( |
66 | 87 |
'label' => t('Before saving a vocabulary'), |
67 | 88 |
'variables' => array( |
68 |
'vocabulary' => array('type' => 'taxonomy_vocabulary', 'label' => t('saved vocabulary'), 'skip save' => TRUE), |
|
69 |
'vocabulary_unchanged' => array('type' => 'taxonomy_vocabulary', 'label' => t('unchanged vocabulary'), 'handler' => 'rules_events_entity_unchanged'), |
|
89 |
'vocabulary' => array( |
|
90 |
'type' => 'taxonomy_vocabulary', |
|
91 |
'label' => t('saved vocabulary'), |
|
92 |
'skip save' => TRUE, |
|
93 |
), |
|
94 |
'vocabulary_unchanged' => array( |
|
95 |
'type' => 'taxonomy_vocabulary', |
|
96 |
'label' => t('unchanged vocabulary'), |
|
97 |
'handler' => 'rules_events_entity_unchanged', |
|
98 |
), |
|
70 | 99 |
), |
71 | 100 |
), |
72 | 101 |
'taxonomy_vocabulary_delete' => $defaults_vocab + array( |
73 | 102 |
'label' => t('After deleting a vocabulary'), |
74 | 103 |
'variables' => array( |
75 |
'vocabulary' => array('type' => 'taxonomy_vocabulary', 'label' => t('deleted vocabulary')), |
|
104 |
'vocabulary' => array( |
|
105 |
'type' => 'taxonomy_vocabulary', |
|
106 |
'label' => t('deleted vocabulary'), |
|
107 |
), |
|
76 | 108 |
), |
77 | 109 |
), |
78 | 110 |
); |
... | ... | |
105 | 137 |
* Returns the label to use for the bundle property. |
106 | 138 |
* |
107 | 139 |
* @return string |
140 |
* The label to use for the bundle property. |
|
108 | 141 |
*/ |
109 | 142 |
protected function getBundlePropertyLabel() { |
110 | 143 |
return t('vocabulary'); |
111 | 144 |
} |
145 |
|
|
112 | 146 |
} |
113 | 147 |
|
114 | 148 |
/** |
Formats disponibles : Unified diff
Weekly update of contrib modules