You are here

function nodequeue_get_subqueues_by_node in Nodequeue 5.2

Same name and namespace in other branches
  1. 6.2 nodequeue.module \nodequeue_get_subqueues_by_node()
  2. 7.3 nodequeue.module \nodequeue_get_subqueues_by_node()
  3. 7.2 nodequeue.module \nodequeue_get_subqueues_by_node()

Get a list of valid subqueues for a node, along with the position of the node.

Parameters

$queues: An array of fully loaded queue objects.

$node: A fully loaded node object.

6 calls to nodequeue_get_subqueues_by_node()
action_nodequeue_add in ./nodequeue.actions.inc
Old-style action to add a node to a queue.
nodequeue_add_action in ./nodequeue.actions.inc
Action to add a node to a queue.
nodequeue_link in ./nodequeue.module
Implementation of hook_link
nodequeue_node_tab in ./nodequeue.module
Display the queue controls for a node.
nodequeue_workflow_ng_action_add_node_to_nodequeue in ./nodequeue.workflow_ng.inc

... See full list

File

./nodequeue.module, line 2078

Code

function nodequeue_get_subqueues_by_node($queues, $node) {

  // Determine which subqueues are valid for each queue.
  $references = array();
  foreach ($queues as $queue) {
    if ($result = nodequeue_api_subqueues($queue, $node)) {
      $references[$queue->qid] = is_array($result) ? $result : array(
        $result,
      );
    }
  }
  if (empty($references)) {
    return;
  }
  return nodequeue_load_subqueues_by_reference($references);
}