Loader for Helper-Classes from Plugin

This commit is contained in:
Busfreak
2016-03-23 18:06:16 +01:00
parent 2425fd85c0
commit 4f2468fc38
3 changed files with 34 additions and 0 deletions

View File

@@ -40,6 +40,17 @@ abstract class Base extends \Kanboard\Core\Base
return array();
}
/**
* 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
*

View File

@@ -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;
}