diff options
author | Busfreak <martin@middeke.de> | 2016-03-23 18:06:16 +0100 |
---|---|---|
committer | Busfreak <martin@middeke.de> | 2016-03-23 18:06:16 +0100 |
commit | 4f2468fc3881ebeefc70e19479606496cec0c6cb (patch) | |
tree | 176d735d9b822c94fa89b643e94f0a407b93038f /app/Core/Plugin | |
parent | 2425fd85c04e7ad6e571da1848bb8d4b54499394 (diff) |
Loader for Helper-Classes from Plugin
Diffstat (limited to 'app/Core/Plugin')
-rw-r--r-- | app/Core/Plugin/Base.php | 11 | ||||
-rw-r--r-- | app/Core/Plugin/Loader.php | 2 |
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; } |