summaryrefslogtreecommitdiff
path: root/plugins/Timetrackingeditor/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/Timetrackingeditor/Plugin.php
parent7b66ddf2e4fbdb837e78d8b7dbaa9fc38391bc32 (diff)
Time tracking related pluginsHEADmaster
Diffstat (limited to 'plugins/Timetrackingeditor/Plugin.php')
-rw-r--r--plugins/Timetrackingeditor/Plugin.php91
1 files changed, 91 insertions, 0 deletions
diff --git a/plugins/Timetrackingeditor/Plugin.php b/plugins/Timetrackingeditor/Plugin.php
new file mode 100644
index 00000000..f36403fb
--- /dev/null
+++ b/plugins/Timetrackingeditor/Plugin.php
@@ -0,0 +1,91 @@
+<?php
+
+namespace Kanboard\Plugin\Timetrackingeditor;
+
+use Kanboard\Core\Translator;
+use Kanboard\Core\Plugin\Base;
+use Kanboard\Plugin\Timetrackingeditor\Helper\SubtaskHelper;
+use Kanboard\Plugin\Timetrackingeditor\Model\SubtaskTimeTrackingModel;
+use Kanboard\Plugin\Timetrackingeditor\Console\AllSubtaskTimeTrackingExportCommand;
+
+class Plugin extends Base
+{
+ public function initialize()
+ {
+ $this->hook->on("template:layout:css", array("template" => "plugins/Timetrackingeditor/assets/css/timetrackingeditor.css"));
+ $this->template->setTemplateOverride('task/time_tracking_details', 'timetrackingeditor:time_tracking_editor');
+ $this->template->setTemplateOverride('subtask/table', 'timetrackingeditor:subtask/table');
+
+ # $this->helper->register("subtask", "Kanboard\Plugin\Timetrackingeditor\Helper\SubtaskHelper");
+
+ $this->container["cli"]->add(new AllSubtaskTimeTrackingExportCommand($this->container));
+ }
+
+ public function onStartup()
+ {
+ Translator::load($this->languageModel->getCurrentLanguage(), __DIR__.'/Locale');
+ }
+
+ public function getClasses()
+ {
+ return array(
+ 'Plugin\Timetrackingeditor\Model' => array(
+ 'SubtaskTimeTrackingCreationModel',
+ 'SubtaskTimeTrackingEditModel',
+ 'SubtaskTimeTrackingModel',
+ ),
+ 'Plugin\Timetrackingeditor\Filter' => array(
+ 'SubtaskFilter',
+ 'SubtaskTaskFilter',
+ 'SubtaskTitleFilter'
+ ),
+ 'Plugin\Timetrackingeditor\Console' => array(
+ 'AllSubtaskTimeTrackingExportCommand'
+ ),
+ 'Plugin\Timetrackingeditor\Controller' => array(
+ 'SubtaskStatusController',
+ 'SubtaskAjaxController',
+ 'TimeTrackingEditorController'
+ ),
+ 'Plugin\Timetrackingeditor\Export' => array(
+ 'SubtaskTimeTrackingExport'
+ ),
+ 'Plugin\Timetrackingeditor\Validator' => array(
+ 'SubtaskTimeTrackingValidator'
+ ),
+ 'Plugin\Timetrackingeditor\Formatter' => array(
+ 'SubtaskAutoCompleteFormatter'
+ ),
+ );
+ }
+
+ public function getPluginName()
+ {
+ return 'TimeTrackingEditor';
+ }
+
+ public function getPluginDescription()
+ {
+ return t('Allows Editing of TimeTracking Values');
+ }
+
+ public function getPluginAuthor()
+ {
+ return 'Thomas Stinner';
+ }
+
+ public function getPluginVersion()
+ {
+ return '1.0.21';
+ }
+
+ public function getPluginHomepage()
+ {
+ return 'https://github.com/stinnux/kanboard-timetrackingeditor';
+ }
+
+ public function getCompatibleVersion()
+ {
+ return '>=1.2.4';
+ }
+}