Projet

Général

Profil

Révision 950416da

Ajouté par Assos Assos il y a plus de 5 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/rules/tests/rules_test.test.inc
1 1
<?php
2 2

  
3 3
/**
4
 * @file Include file for testing file inclusion.
4
 * @file
5
 * Include file for testing file inclusion.
5 6
 */
6 7

  
7 8
/**
......
11 12
  throw new RulesEvaluationException('Custom save method invoked.');
12 13
}
13 14

  
14

  
15 15
/**
16
 * Custom help callback for the rules_node_publish_action
16
 * Custom help callback for the rules_node_publish_action().
17 17
 */
18 18
function rules_test_custom_help() {
19 19
  return 'custom';
20 20
}
21 21

  
22 22
/**
23
 * Action callback
23
 * Action callback.
24 24
 */
25 25
function rules_action_test_reference($data) {
26 26
  $data['changed'] = TRUE;
......
28 28
}
29 29

  
30 30
/**
31
 * Condition: Check for selected content types
31
 * Condition: Check for selected content types.
32 32
 */
33 33
function rules_condition_content_is_type($node, $type) {
34 34
  return in_array($node->type, $type);
35 35
}
36 36

  
37 37
/**
38
 * Condition: Check if the node is published
38
 * Condition: Check if the node is published.
39 39
 */
40 40
function rules_condition_content_is_published($node, $settings) {
41 41
  return $node->status == 1;
42 42
}
43 43

  
44 44
/**
45
 * Loads a node
45
 * Loads a node.
46 46
 */
47 47
function rules_action_load_node($nid, $vid = NULL) {
48 48
  return array('node_loaded' => node_load($nid, $vid ? $vid : NULL));

Formats disponibles : Unified diff