Move budget outside of the core

The budget planning feature is now a plugin
See: https://github.com/kanboard/plugin-budget
This commit is contained in:
Frederic Guillot
2015-09-13 16:56:51 -04:00
parent d400f7c5be
commit 4b6672d0b3
47 changed files with 20 additions and 1596 deletions

View File

@@ -35,7 +35,6 @@ use Pimple\Container;
* @property \Model\Action $action
* @property \Model\Authentication $authentication
* @property \Model\Board $board
* @property \Model\Budget $budget
* @property \Model\Category $category
* @property \Model\Color $color
* @property \Model\Comment $comment
@@ -43,7 +42,6 @@ use Pimple\Container;
* @property \Model\Currency $currency
* @property \Model\DateParser $dateParser
* @property \Model\File $file
* @property \Model\HourlyRate $hourlyRate
* @property \Model\LastLogin $lastLogin
* @property \Model\Link $link
* @property \Model\Notification $notification

View File

@@ -28,4 +28,20 @@ abstract class PluginBase extends Base
{
return array();
}
/**
* Listen on internal events
*
* @access public
* @param string $event
* @param callable $callback
*/
public function on($event, $callback)
{
$container = $this->container;
$this->container['dispatcher']->addListener($event, function() use ($container, $callback) {
call_user_func($callback, $container);
});
}
}

View File

@@ -20,13 +20,6 @@ class PluginLoader extends Base
*/
const TABLE_SCHEMA = 'plugin_schema_versions';
/**
* Plugin folder
*
* @var string
*/
const PATH = __DIR__.'/../../plugins';
/**
* Scan plugin folder and load plugins
*
@@ -34,8 +27,8 @@ class PluginLoader extends Base
*/
public function scan()
{
if (file_exists(self::PATH)) {
$dir = new DirectoryIterator(self::PATH);
if (file_exists(__DIR__.'/../../plugins')) {
$dir = new DirectoryIterator(__DIR__.'/../../plugins');
foreach ($dir as $fileinfo) {
if (! $fileinfo->isDot() && $fileinfo->isDir()) {