summaryrefslogtreecommitdiff
path: root/app/Event/SubTaskNotificationListener.php
blob: 299ae00b65448f015a4939f0956ee85aa98e09f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php

namespace Event;

use Event\BaseNotificationListener;

/**
 * SubTask notification listener
 *
 * @package event
 * @author  Frederic Guillot
 */
class SubTaskNotificationListener 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['subtask'] = $this->notification->subtask->getById($data['id'], true);
        $values['task'] = $this->notification->task->getDetails($data['task_id']);

        return $values;
    }
}