summaryrefslogtreecommitdiff
path: root/plugins/TaskIntervalButton/Plugin.php
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2020-05-05 14:25:42 +0200
committeremkael <emkael@tlen.pl>2020-05-05 14:25:42 +0200
commit62827e6cf470449c117624058fb36ad94804bcc0 (patch)
tree10cd1e4d36c34b694acfadaa69fc7f6ae2b1eabd /plugins/TaskIntervalButton/Plugin.php
parent7b66ddf2e4fbdb837e78d8b7dbaa9fc38391bc32 (diff)
Time tracking related pluginsHEADmaster
Diffstat (limited to 'plugins/TaskIntervalButton/Plugin.php')
-rw-r--r--plugins/TaskIntervalButton/Plugin.php47
1 files changed, 47 insertions, 0 deletions
diff --git a/plugins/TaskIntervalButton/Plugin.php b/plugins/TaskIntervalButton/Plugin.php
new file mode 100644
index 00000000..ea73cf11
--- /dev/null
+++ b/plugins/TaskIntervalButton/Plugin.php
@@ -0,0 +1,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';
+ }
+}
+