summaryrefslogtreecommitdiff
path: root/app/Event/FileNotificationListener.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Event/FileNotificationListener.php')
-rw-r--r--app/Event/FileNotificationListener.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/app/Event/FileNotificationListener.php b/app/Event/FileNotificationListener.php
new file mode 100644
index 00000000..98fc4260
--- /dev/null
+++ b/app/Event/FileNotificationListener.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace Event;
+
+use Event\BaseNotificationListener;
+
+/**
+ * File notification listener
+ *
+ * @package event
+ * @author Frederic Guillot
+ */
+class FileNotificationListener 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['file'] = $data;
+ $values['task'] = $this->notification->task->getById($data['task_id'], true);
+
+ return $values;
+ }
+}