summaryrefslogtreecommitdiff
path: root/app/Core/Plugin
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-03-24 18:40:49 -0400
committerFrederic Guillot <fred@kanboard.net>2016-03-24 18:40:49 -0400
commit3a5f5abda2735f3ecf0e02bab3ee5fc11ed3e5bd (patch)
treede66ddebe8f62e5f919245803329f6dae8a92514 /app/Core/Plugin
parente5812d33ec6e2fad69b7e3ee1eecedcb1c4ae4fa (diff)
parent4f2468fc3881ebeefc70e19479606496cec0c6cb (diff)
Merge pull-request #2044
Diffstat (limited to 'app/Core/Plugin')
-rw-r--r--app/Core/Plugin/Base.php11
-rw-r--r--app/Core/Plugin/Loader.php2
2 files changed, 13 insertions, 0 deletions
diff --git a/app/Core/Plugin/Base.php b/app/Core/Plugin/Base.php
index 15265370..381b8bb3 100644
--- a/app/Core/Plugin/Base.php
+++ b/app/Core/Plugin/Base.php
@@ -41,6 +41,17 @@ abstract class Base extends \Kanboard\Core\Base
}
/**
+ * Returns all helper classes that needs to be stored in the DI container
+ *
+ * @access public
+ * @return array
+ */
+ public function getHelpers()
+ {
+ return array();
+ }
+
+ /**
* Listen on internal events
*
* @access public
diff --git a/app/Core/Plugin/Loader.php b/app/Core/Plugin/Loader.php
index ff4f2c14..775673de 100644
--- a/app/Core/Plugin/Loader.php
+++ b/app/Core/Plugin/Loader.php
@@ -70,6 +70,8 @@ class Loader extends \Kanboard\Core\Base
Tool::buildDic($this->container, $instance->getClasses());
+ Tool::buildDICHelpers($this->container, $instance->getHelpers());
+
$instance->initialize();
$this->plugins[] = $instance;
}