summaryrefslogtreecommitdiff
path: root/plugins/InternalID/Plugin.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/InternalID/Plugin.php')
-rw-r--r--plugins/InternalID/Plugin.php58
1 files changed, 58 insertions, 0 deletions
diff --git a/plugins/InternalID/Plugin.php b/plugins/InternalID/Plugin.php
new file mode 100644
index 00000000..02c6adca
--- /dev/null
+++ b/plugins/InternalID/Plugin.php
@@ -0,0 +1,58 @@
+<?php
+
+namespace Kanboard\Plugin\InternalID;
+
+use Kanboard\Core\Plugin\Base;
+use Kanboard\Core\Translator;
+
+class Plugin extends Base
+{
+ public function initialize()
+ {
+ $queryHook = function($query) {
+ $query
+ ->addColumns(Model\InternalTaskIDModel::TABLE.'.internal_task_id')
+ ->join(Model\InternalTaskIDModel::TABLE, 'id', 'id', $this->taskModel::TABLE);
+ return $query;
+ };
+ $this->hook->on('task:query:extended', $queryHook);
+ }
+
+ public function onStartup()
+ {
+ Translator::load($this->languageModel->getCurrentLanguage(), __DIR__.'/Locale');
+ }
+
+ public function getPluginName()
+ {
+ return 'Internal ID';
+ }
+
+ public function getPluginDescription()
+ {
+ return t('Internal (per-project) task numbers');
+ }
+
+ public function getPluginAuthor()
+ {
+ return 'mkl';
+ }
+
+ public function getPluginVersion()
+ {
+ return '1.0.0';
+ }
+
+ public function getPluginHomepage()
+ {
+ return 'https://kanban.intranet/';
+ }
+
+ public function getClasses() {
+ return array(
+ 'Plugin\InternalID\Model' => array(
+ 'InternalTaskIDModel',
+ )
+ );
+ }
+}