-
Notifications
You must be signed in to change notification settings - Fork 0
/
workbench_nodequeue.module
53 lines (44 loc) · 1.23 KB
/
workbench_nodequeue.module
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
/**
* @file
* Managing Nodequeues in Workbench
*
*
*/
/**
* Implements hook_menu().
*/
function workbench_nodequeue_menu() {
$items = array();
$items['admin/workbench/queues'] = array(
'title' => 'My Queues',
'page callback' => 'workbench_nodequeue_overview',
'access arguments' => array('access workbench'),
'weight' => 0,
'type' => MENU_LOCAL_TASK | MENU_NORMAL_ITEM,
'file' => 'workbench_nodequeue.pages.inc',
);
$queues = db_select('nodequeue_queue','n')
->fields('n', array('qid', 'title'))
->execute()
->fetchAll();
$items['admin/workbench/queues/all'] = array(
'title' => 'All',
'page callback' => 'workbench_nodequeue_queue_view',
'page arguments' => array(3),
'access arguments' => array('access workbench'),
'weight' => -10,
'type' => MENU_DEFAULT_LOCAL_TASK
);
foreach($queues as $queue) {
$items['admin/workbench/queues/' . $queue->qid] = array(
'title' => $queue->title,
'page callback' => 'workbench_nodequeue_queue_view',
'page arguments' => array(3),
'access arguments' => array('access workbench'),
'file' => 'workbench_nodequeue.pages.inc',
'type' => MENU_LOCAL_TASK
);
}
return $items;
}