summaryrefslogtreecommitdiff
path: root/app/Event/TaskNotificationListener.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Event/TaskNotificationListener.php')
-rw-r--r--app/Event/TaskNotificationListener.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/app/Event/TaskNotificationListener.php b/app/Event/TaskNotificationListener.php
new file mode 100644
index 00000000..ffbe7a8c
--- /dev/null
+++ b/app/Event/TaskNotificationListener.php
@@ -0,0 +1,29 @@
+<?php
+
+namespace Event;
+
+use Event\BaseNotificationListener;
+
+/**
+ * Task notification listener
+ *
+ * @package event
+ * @author Frederic Guillot
+ */
+class TaskNotificationListener extends BaseNotificationListener
+{
+ /**
+ * Fetch data for the mail template
+ *
+ * @access public
+ * @param array $data Event data
+ * @return array
+ */
+ public function getTemplateData(array $data)
+ {
+ $values = array();
+ $values['task'] = $this->notification->task->getById($data['task_id'], true);
+
+ return $values;
+ }
+}