You are here

function smartqueue_domain_get_subqueues_by_domain in Smartqueue Domain 7

Helper function. Get all subqueues belonging to a domain.

Parameters

$domain: A domain object.

Return value

An array of subqueues, keyed by subqueue id.

1 call to smartqueue_domain_get_subqueues_by_domain()
smartqueue_domain_domain_delete in ./smartqueue_domain.module
Implements hook_domain_delete().

File

./smartqueue_domain.module, line 130

Code

function smartqueue_domain_get_subqueues_by_domain($domain) {
  $smartqueue_queues = smartqueue_domain_get_queues();
  $references = array();
  foreach ($smartqueue_queues as $queue) {
    $references[$queue->qid] = array(
      $queue->name . ':domain:' . $domain['machine_name'] . ':' . $domain['domain_id'],
    );
  }
  return nodequeue_load_subqueues_by_reference($references);
}