From 4b6672d0b33563ab8888d592ef86616ca9238007 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 13 Sep 2015 16:56:51 -0400 Subject: Move budget outside of the core The budget planning feature is now a plugin See: https://github.com/kanboard/plugin-budget --- app/Core/PluginBase.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'app/Core/PluginBase.php') diff --git a/app/Core/PluginBase.php b/app/Core/PluginBase.php index 9c3d6e32..457afa03 100644 --- a/app/Core/PluginBase.php +++ b/app/Core/PluginBase.php @@ -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); + }); + } } -- cgit v1.2.3