Improve Automatic Actions plugin api
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user