summaryrefslogtreecommitdiff
path: root/plugins/TaskIntervalButton/Plugin.php
blob: ea73cf11357bfe78291078e0c951d06e39d91035 (plain)
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
<?php

namespace Kanboard\Plugin\TaskIntervalButton;

use Kanboard\Core\Plugin\Base;
use Kanboard\Core\Translator;
use Kanboard\Core\Security\Role;

class Plugin extends Base
{
    public function initialize()
    {
        $this->projectAccessMap->add('TaskIntervalController', array("confirm", "addInterval"), Role::PROJECT_MEMBER);
        $this->template->hook->attach('template:task:sidebar:actions', 'TaskIntervalButton:task_add_interval/add_interval_button');
    }

    public function onStartup()
    {
        Translator::load($this->languageModel->getCurrentLanguage(), __DIR__.'/Locale');
    }

    public function getPluginName()
    {
        return 'Task Interval Button';
    }

    public function getPluginDescription()
    {
        return t('Simple plugins which adds button to incrementally change time spent on task.');
    }

    public function getPluginAuthor()
    {
        return 'Igor Mroz';
    }

    public function getPluginVersion()
    {
        return '0.9.0';
    }

    public function getPluginHomepage()
    {
        return 'https://github.com/mrozigor/kanboard-add-time-interval-plugin';
    }
}