diff options
Diffstat (limited to 'app/Subscriber')
-rw-r--r-- | app/Subscriber/Base.php | 1 | ||||
-rw-r--r-- | app/Subscriber/BootstrapSubscriber.php | 4 | ||||
-rw-r--r-- | app/Subscriber/ProjectActivitySubscriber.php | 4 |
3 files changed, 5 insertions, 4 deletions
diff --git a/app/Subscriber/Base.php b/app/Subscriber/Base.php index 5f884b39..abc051b3 100644 --- a/app/Subscriber/Base.php +++ b/app/Subscriber/Base.php @@ -19,6 +19,7 @@ use Pimple\Container; * @property \Model\Task $task * @property \Model\TaskExport $taskExport * @property \Model\TaskFinder $taskFinder + * @property \Model\UserSession $userSession */ abstract class Base { diff --git a/app/Subscriber/BootstrapSubscriber.php b/app/Subscriber/BootstrapSubscriber.php index 30b8f168..e256159a 100644 --- a/app/Subscriber/BootstrapSubscriber.php +++ b/app/Subscriber/BootstrapSubscriber.php @@ -16,7 +16,7 @@ class BootstrapSubscriber extends Base implements EventSubscriberInterface public function setup() { - $this->container['config']->setupTranslations(); - $this->container['config']->setupTimezone(); + $this->config->setupTranslations(); + $this->config->setupTimezone(); } } diff --git a/app/Subscriber/ProjectActivitySubscriber.php b/app/Subscriber/ProjectActivitySubscriber.php index 1aca8539..3daf2f4d 100644 --- a/app/Subscriber/ProjectActivitySubscriber.php +++ b/app/Subscriber/ProjectActivitySubscriber.php @@ -30,14 +30,14 @@ class ProjectActivitySubscriber extends Base implements EventSubscriberInterface public function execute(GenericEvent $event) { // Executed only when someone is logged - if ($this->container['acl']->isLogged() && isset($event['task_id'])) { + if ($this->userSession->isLogged() && isset($event['task_id'])) { $values = $this->getValues($event); $this->projectActivity->createEvent( $values['task']['project_id'], $values['task']['id'], - $this->acl->getUserId(), + $this->userSession->getId(), $event->getName(), $values ); |