forked from xavividal/kanboard-plugin-relationgraph
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Plugin.php
55 lines (43 loc) · 1.45 KB
/
Plugin.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
<?php
namespace Kanboard\Plugin\Relationgraph;
use Kanboard\Core\Plugin\Base;
use Kanboard\Core\Translator;
class Plugin extends Base
{
public function initialize()
{
$this->route->addRoute('/plugin/relation_graph/:task_id', 'relationgraph', 'show', 'relationgraph');
$this->hook->on('template:layout:js', array('template' => 'plugins/Relationgraph/Asset/Javascript/vis/vis.js'));
$this->hook->on('template:layout:js', array('template' => 'plugins/Relationgraph/Asset/Javascript/GraphBuilder.js'));
$this->hook->on('template:layout:css', array('template' => 'plugins/Relationgraph/Asset/Javascript/vis/vis.css'));
$this->template->hook->attach('template:task:sidebar:information', 'relationgraph:task/sidebar');
}
public function getPluginName()
{
return 'Relationgraph';
}
public function getPluginAuthor()
{
return 'BlueTeck, Xavier Vidal';
}
public function getPluginVersion()
{
return '0.3.1';
}
public function getPluginDescription()
{
return t('Show relations between tasks using a graph');
}
public function getPluginHomepage()
{
return 'https://github.com/BlueTeck/kanboard_plugin_relationgraph';
}
public function onStartup()
{
Translator::load($this->languageModel->getCurrentLanguage(), __DIR__.'/Locale');
}
public function getCompatibleVersion()
{
return '>=1.2.10';
}
}