summaryrefslogtreecommitdiff
path: root/plugins/Timetrackingeditor/Plugin.php
diff options
context:
space:
mode:
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';
+ }
+}