You are here

function _nodequeue_autocomplete in Nodequeue 6.2

Same name and namespace in other branches
  1. 5.2 nodequeue.module \_nodequeue_autocomplete()
  2. 7.3 includes/nodequeue.admin.inc \_nodequeue_autocomplete()
  3. 7.2 includes/nodequeue.admin.inc \_nodequeue_autocomplete()
2 calls to _nodequeue_autocomplete()
NodequeueAPIMiscUnitTest::testNodequeueAutocomplete in tests/nodequeue.test
nodequeue_autocomplete in includes/nodequeue.admin.inc
Page callback for autocomplete.
1 string reference to '_nodequeue_autocomplete'
nodequeue_api_autocomplete in ./nodequeue.module
Fetch a list of nodes available to a given subqueue for autocomplete.

File

includes/nodequeue.admin.inc, line 1083
Admin page callbacks for the nodequeue module.

Code

function _nodequeue_autocomplete($sqid, $string) {
  $output = array();
  if (!is_numeric($sqid) || !$string) {
    return $output;
  }
  $subqueue = nodequeue_load_subqueue($sqid);
  if (!$subqueue) {
    return $output;
  }
  $queue = nodequeue_load($subqueue->qid);
  if (!$queue) {
    return $output;
  }
  $nodes = nodequeue_api_autocomplete($queue, $subqueue, $string);
  return $nodes;
}