diff options
Diffstat (limited to 'plugins/DefaultSelfAssign/Plugin.php')
-rw-r--r-- | plugins/DefaultSelfAssign/Plugin.php | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/plugins/DefaultSelfAssign/Plugin.php b/plugins/DefaultSelfAssign/Plugin.php new file mode 100644 index 00000000..48a966d3 --- /dev/null +++ b/plugins/DefaultSelfAssign/Plugin.php @@ -0,0 +1,51 @@ +<?php + +namespace Kanboard\Plugin\DefaultSelfAssign; + +use Kanboard\Core\Plugin\Base; +use Kanboard\Core\Translator; + +class Plugin extends Base +{ + public function initialize() + { + $container = $this; + $this->hook->on('controller:task-creation:form:default', function($values) use($container) { + $user = $container->userSession->getId(); + return array('owner_id' => $user); + }); + } + + public function onStartup() + { + } + + public function getPluginName() + { + return 'DefaultSelfAssign'; + } + + public function getPluginDescription() + { + return 'Self-assign tasks by default'; + } + + public function getPluginAuthor() + { + return 'mkl'; + } + + public function getPluginVersion() + { + return '1.0.0'; + } + + public function getPluginHomepage() + { + return 'https://kanban.intranet/'; + } + + public function getClasses() { + return array(); + } +} |