From 17dc5bdc9ede52ad618bbf326e67e3b6988170f7 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sat, 27 Dec 2014 19:10:38 -0500 Subject: Move events handling to Symfony\EventDispatcher --- app/Subscriber/ProjectDailySummarySubscriber.php | 27 ++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 app/Subscriber/ProjectDailySummarySubscriber.php (limited to 'app/Subscriber/ProjectDailySummarySubscriber.php') diff --git a/app/Subscriber/ProjectDailySummarySubscriber.php b/app/Subscriber/ProjectDailySummarySubscriber.php new file mode 100644 index 00000000..6d737734 --- /dev/null +++ b/app/Subscriber/ProjectDailySummarySubscriber.php @@ -0,0 +1,27 @@ + array('execute', 0), + Task::EVENT_CLOSE => array('execute', 0), + Task::EVENT_OPEN => array('execute', 0), + Task::EVENT_MOVE_COLUMN => array('execute', 0), + ); + } + + public function execute(TaskEvent $event) + { + if (isset($event['project_id'])) { + $this->projectDailySummary->updateTotals($event['project_id'], date('Y-m-d')); + } + } +} -- cgit v1.2.3