summaryrefslogtreecommitdiff
path: root/app/Core/Plugin/Loader.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-05-07 18:15:32 -0400
committerFrederic Guillot <fred@kanboard.net>2016-05-07 18:15:32 -0400
commit714bdb0d024c952cafd7924212b862ae31d7f1d4 (patch)
treeea92eeed3741db65d8117e0fb427763b94f1416d /app/Core/Plugin/Loader.php
parent55ee906ba36cf66c3a390c98dde75e241de26e65 (diff)
Added method onStartup() for plugins
Diffstat (limited to 'app/Core/Plugin/Loader.php')
-rw-r--r--app/Core/Plugin/Loader.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/Core/Plugin/Loader.php b/app/Core/Plugin/Loader.php
index 799024ad..3482b7ee 100644
--- a/app/Core/Plugin/Loader.php
+++ b/app/Core/Plugin/Loader.php
@@ -77,6 +77,11 @@ class Loader extends \Kanboard\Core\Base
Tool::buildDICHelpers($this->container, $instance->getHelpers());
$instance->initialize();
+
+ if (method_exists($instance, 'onStartup')) {
+ $this->dispatcher->addListener('app.bootstrap', array($instance, 'onStartup'));
+ }
+
$this->plugins[] = $instance;
}