-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadvancedqueue.module
52 lines (45 loc) · 1.04 KB
/
advancedqueue.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
<?php
/**
* @file
* Helper module for advanced queuing.
*/
/**
* Status indicating item was added to the queue.
*/
define('ADVANCEDQUEUE_STATUS_QUEUED', -1);
/**
* Status indicating item is currently being processed.
*/
define('ADVANCEDQUEUE_STATUS_PROCESSING', 0);
/**
* Status indicating item was processed successfuly.
*/
define('ADVANCEDQUEUE_STATUS_SUCCESS', 1);
/**
* Status indicating item processing failed.
*/
define('ADVANCEDQUEUE_STATUS_FAILURE', 2);
/**
* Implements hook_views_api().
*/
function advancedqueue_views_api() {
return array(
'api' => 2,
'path' => drupal_get_path('module', 'advancedqueue') . '/views',
);
}
/**
* Implements hook_advancedqueue_entity_info().
*/
function advancedqueue_entity_info() {
$entity_info['advancedqueue_item'] = array(
'label' => t('Advanced queue item'),
'controller class' => 'DrupalDefaultEntityController',
'base table' => 'advancedqueue',
'module' => 'advancedqueue',
'entity keys' => array(
'id' => 'item_id',
),
);
return $entity_info;
}