Improve Automatic Actions plugin api

This commit is contained in:
Frederic Guillot
2016-01-03 16:43:13 -05:00
parent d578b612ea
commit a296ba5b18
82 changed files with 3011 additions and 1665 deletions

View File

@@ -3,21 +3,26 @@
namespace Kanboard\Subscriber;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Kanboard\Core\Base;
class BootstrapSubscriber extends \Kanboard\Core\Base implements EventSubscriberInterface
class BootstrapSubscriber extends Base implements EventSubscriberInterface
{
public static function getSubscribedEvents()
{
return array(
'app.bootstrap' => array('setup', 0),
'app.bootstrap' => 'execute',
);
}
public function setup()
public function execute()
{
$this->config->setupTranslations();
$this->config->setupTimezone();
$this->sessionStorage->hasSubtaskInProgress = $this->subtask->hasSubtaskInProgress($this->userSession->getId());
$this->actionManager->attachEvents();
if ($this->userSession->isLogged()) {
$this->sessionStorage->hasSubtaskInProgress = $this->subtask->hasSubtaskInProgress($this->userSession->getId());
}
}
public function __destruct()