Révision 950416da
Ajouté par Assos Assos il y a plus de 5 ans
drupal7/sites/all/modules/rules/modules/comment.rules.inc | ||
---|---|---|
1 | 1 |
<?php |
2 | 2 |
|
3 | 3 |
/** |
4 |
* @file rules integration for the comment module |
|
4 |
* @file |
|
5 |
* Rules integration for the comment module. |
|
5 | 6 |
* |
6 | 7 |
* @addtogroup rules |
8 |
* |
|
7 | 9 |
* @{ |
8 | 10 |
*/ |
9 | 11 |
|
10 | 12 |
/** |
11 |
* Implementation of hook_rules_event_info().
|
|
13 |
* Implements hook_rules_event_info().
|
|
12 | 14 |
*/ |
13 | 15 |
function rules_comment_event_info() { |
14 | 16 |
$defaults = array( |
... | ... | |
27 | 29 |
'comment_update' => $defaults + array( |
28 | 30 |
'label' => t('After updating an existing comment'), |
29 | 31 |
'variables' => array( |
30 |
'comment' => array('type' => 'comment', 'label' => t('updated comment')), |
|
31 |
'comment_unchanged' => array('type' => 'comment', 'label' => t('unchanged comment'), 'handler' => 'rules_events_entity_unchanged'), |
|
32 |
'comment' => array( |
|
33 |
'type' => 'comment', |
|
34 |
'label' => t('updated comment'), |
|
35 |
), |
|
36 |
'comment_unchanged' => array( |
|
37 |
'type' => 'comment', |
|
38 |
'label' => t('unchanged comment'), |
|
39 |
'handler' => 'rules_events_entity_unchanged', |
|
40 |
), |
|
32 | 41 |
), |
33 | 42 |
), |
34 | 43 |
'comment_presave' => $defaults + array( |
35 | 44 |
'label' => t('Before saving a comment'), |
36 | 45 |
'variables' => array( |
37 |
'comment' => array('type' => 'comment', 'label' => t('saved comment'), 'skip save' => TRUE), |
|
38 |
'comment_unchanged' => array('type' => 'comment', 'label' => t('unchanged comment'), 'handler' => 'rules_events_entity_unchanged'), |
|
46 |
'comment' => array( |
|
47 |
'type' => 'comment', |
|
48 |
'label' => t('saved comment'), |
|
49 |
'skip save' => TRUE, |
|
50 |
), |
|
51 |
'comment_unchanged' => array( |
|
52 |
'type' => 'comment', |
|
53 |
'label' => t('unchanged comment'), |
|
54 |
'handler' => 'rules_events_entity_unchanged', |
|
55 |
), |
|
39 | 56 |
), |
40 | 57 |
), |
41 | 58 |
'comment_view' => $defaults + array( |
... | ... | |
72 | 89 |
* Returns the label to use for the bundle property. |
73 | 90 |
* |
74 | 91 |
* @return string |
92 |
* Returns the label to use for the bundle property. |
|
75 | 93 |
*/ |
76 | 94 |
protected function getBundlePropertyLabel() { |
77 | 95 |
return t('type'); |
78 | 96 |
} |
97 |
|
|
79 | 98 |
} |
80 | 99 |
|
81 | 100 |
/** |
Formats disponibles : Unified diff
Weekly update of contrib modules