From b8fa0246803dab40cf57d40b45984c53046f2d55 Mon Sep 17 00:00:00 2001 From: "Dzial Techniczny WMW Projekt s.c" Date: Tue, 10 Dec 2019 11:34:53 +0100 Subject: Plugins directory and local modifications --- plugins/KanboardSearchPlugin/Plugin.php | 62 +++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 plugins/KanboardSearchPlugin/Plugin.php (limited to 'plugins/KanboardSearchPlugin/Plugin.php') diff --git a/plugins/KanboardSearchPlugin/Plugin.php b/plugins/KanboardSearchPlugin/Plugin.php new file mode 100644 index 00000000..4b041d1a --- /dev/null +++ b/plugins/KanboardSearchPlugin/Plugin.php @@ -0,0 +1,62 @@ +template->hook->attach("template:config:sidebar", + "KanboardSearchPlugin:config/sidebar"); + + $this->route->addRoute('settings/advancedsearch', 'AdvancedSearchController', 'index', + 'KanboardSearchPlugin'); + + $this->container->extend('taskLexer', function ($taskLexer, $c) { + /** + * @var LexerBuilder $taskLexer + */ + $taskLexer->withFilter(AdvancedSearchFilter::getInstance() + ->setDatabase($c['db']) + ->setConfigModel($this->configModel) + ->setFileModel($this->taskFileModel), true); + + return $taskLexer; + }); + } + + public function onStartup() + { + Translator::load($this->languageModel->getCurrentLanguage(), __DIR__.'/Locale'); + } + + public function getPluginName() + { + return 'KanboardSearchPlugin'; + } + + public function getPluginDescription() + { + return t('This plugin is used for advanced fulltext search within all Projects'); + } + + public function getPluginAuthor() + { + return 'ipunkt Business Solutions'; + } + + public function getPluginVersion() + { + return '1.0.0'; + } + + public function getPluginHomepage() + { + return 'https://www.ipunkt.biz/unternehmen/opensource'; + } +} \ No newline at end of file -- cgit v1.2.3