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/modules/node.eval.inc
5 5
 * Contains rules integration for the node module needed during evaluation.
6 6
 *
7 7
 * @addtogroup rules
8
 *
8 9
 * @{
9 10
 */
10 11

  
......
22 23
      'access callback' => 'rules_node_integration_access',
23 24
    );
24 25
  }
26

  
25 27
}
26 28

  
27 29
/**
28
 * Condition: Check for selected content types
30
 * Condition: Check for selected content types.
29 31
 */
30 32
class RulesNodeConditionType extends RulesNodeConditionBase {
31 33

  
......
58 60
  /**
59 61
   * Provides the content type of a node as asserted metadata.
60 62
   */
61
  function assertions() {
63
  public function assertions() {
62 64
    return array('node' => array('bundle' => $this->element->settings['type']));
63 65
  }
66

  
64 67
}
65 68

  
66 69
/**
......
84 87
  public function execute($node) {
85 88
    return $node->status == 1;
86 89
  }
90

  
87 91
}
88 92

  
89 93
/**
......
107 111
  public function execute($node) {
108 112
    return $node->sticky == 1;
109 113
  }
114

  
110 115
}
111 116

  
112 117
/**
113
 * Condition: Check if the node is promoted to the frontpage
118
 * Condition: Check if the node is promoted to the frontpage.
114 119
 */
115 120
class RulesNodeConditionPromoted extends RulesNodeConditionBase {
116 121

  
......
130 135
  public function execute($node) {
131 136
    return $node->promote == 1;
132 137
  }
138

  
133 139
}
134 140

  
135 141
/**

Formats disponibles : Unified diff