-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathTraceability.php
82 lines (72 loc) · 2.1 KB
/
Traceability.php
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php
require_once('pages/api.php');
class TraceabilityPlugin extends MantisPlugin {
/**
* Register plugin
*
* @return void
* @author rcasteran
*/
public function register() {
$this->name = lang_get( 'plugin_traceability_title' );
$this->description = lang_get( 'plugin_traceability_description' );
$this->page = 'config';
$this->version = '1.1.0';
$this->requires = array(
'MantisCore' => '1.2.0'
);
$this->author = 'STRUCT-IT';
$this->contact = 'contact@struct-it.fr';
$this->url = 'http://www.struct-it.fr';
log_traceability_event('Registration successfull');
} /* End of register() */
/**
* Execute plugin schema at installation
*
* @return array
* @author rcasteran
*/
public function schema() {
log_traceability_event('Schema execution successfull');
return array();
} /* End of schema() */
/**
* Configure plugin at installation
*
* @return array
* @author rcasteran
*/
public function config() {
log_traceability_event('Configuration successfull');
return array(
'req_issue_status_threshold' => PLUGIN_TRACEABILITY_ISSUE_STATUS_THRSHD_DEFAULT,
'test_issue_status_threshold' => PLUGIN_TRACEABILITY_ISSUE_STATUS_THRSHD_DEFAULT,
'req_id_var_idx' => PLUGIN_TRACEABILITY_VAR_IDX_NONE,
'test_id_var_idx' => PLUGIN_TRACEABILITY_VAR_IDX_NONE,
'id_delimiter' => PLUGIN_TRACEABILITY_ID_DELIMITER_DEFAULT,
'manage_threshold' => ADMINISTRATOR
);
} /* End of config() */
/**
* Register plugin event hook
*
* @return array
* @author rcasteran
*/
public function hooks() {
log_traceability_event('Event hooks configuration successfull');
return array(
'EVENT_MENU_MAIN' => 'menu_main_callback',
);
} /* End of hooks() */
/**
* EVENT_MENU_MAIN callback
*
* @return string
* @author rcasteran
*/
public function menu_main_callback($p_event, $p_bug_id) {
return '<a href="'.plugin_page('main', false).'">'.lang_get('plugin_traceability_menu').'</a>';
} /* End of menu_main_callback() */
}
?>