You are here

protected function NodeIdArrayRulesDataWrapper::extractIdentifier in Nodequeue 7.2

Extract the identifier of the given data object.

Return value

The extracted identifier.

Overrides RulesIdentifiableDataWrapper::extractIdentifier

File

./nodequeue.rules.inc, line 104
Provides nodequeue (subqueue) rules integration.

Class

NodeIdArrayRulesDataWrapper
Defines rules data wrapper for array of node nids.

Code

protected function extractIdentifier($rules_node_data) {

  // Check whether we have an array of nids or just a node object
  if (is_array($rules_node_data)) {
    $nids = array();
    foreach ($rules_node_data as $node_data) {
      $nids[] = $node_data['nid'];
    }
    return $nids;
  }
  else {
    return $rules_node_data;
  }
}