From 87d2c6d99e6eb26b526f5da22b3496e3d02d11ed Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Thu, 26 Mar 2015 22:40:46 -0400 Subject: Add task transitions history --- app/Subscriber/TransitionSubscriber.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 app/Subscriber/TransitionSubscriber.php (limited to 'app/Subscriber') diff --git a/app/Subscriber/TransitionSubscriber.php b/app/Subscriber/TransitionSubscriber.php new file mode 100644 index 00000000..347dd37d --- /dev/null +++ b/app/Subscriber/TransitionSubscriber.php @@ -0,0 +1,26 @@ + array('execute', 0), + ); + } + + public function execute(TaskEvent $event) + { + $user_id = $this->userSession->getId(); + + if (! empty($user_id)) { + $this->transition->save($user_id, $event->getAll()); + } + } +} \ No newline at end of file -- cgit v1.2.3