function nodequeue_get_qid_map in Nodequeue 7.2
Same name and namespace in other branches
- 6.2 nodequeue.module \nodequeue_get_qid_map()
Return a map of queue name to qid values to aid in various lookups.
Return value
array A array of qids, keyed by machine name.
4 calls to nodequeue_get_qid_map()
- nodequeue_contextual_links_view_alter in ./
nodequeue.module - Implements hook_contextual_links_view_alter().
- nodequeue_handler_relationship_nodequeue::init in includes/
views/ nodequeue_handler_relationship_nodequeue.inc - Init handler to let relationships live on tables other than the table they operate on.
- nodequeue_handler_relationship_nodequeue::query in includes/
views/ nodequeue_handler_relationship_nodequeue.inc - Called to implement a relationship in a query.
- nodequeue_load_queue_by_name in ./
nodequeue.module - Return a queue by its machine name. This is obviously not ideal due to the extra queries, but probably preferable to changing current API calls.
File
- ./
nodequeue.module, line 1142 - Maintains queues of nodes in arbitrary order.
Code
function nodequeue_get_qid_map() {
$map =& drupal_static(__FUNCTION__, array());
if (!$map) {
$result = db_query("SELECT qid, name FROM {nodequeue_queue}");
while ($get = $result
->fetchObject()) {
$map[$get->name] = $get->qid;
}
}
return $map;
}