summaryrefslogtreecommitdiff
path: root/app/Event/ProjectModificationDateListener.php
blob: abc176b09a95958f8ab116205b1c56c09453229f (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;

/**
 * Project modification date listener
 *
 * Update the "last_modified" field for a project
 *
 * @package event
 * @author  Frederic Guillot
 */
class ProjectModificationDateListener extends Base
{
    /**
     * Execute the action
     *
     * @access public
     * @param  array   $data   Event data dictionary
     * @return bool            True if the action was executed or false when not executed
     */
    public function execute(array $data)
    {
        if (isset($data['project_id'])) {
            return $this->project->updateModificationDate($data['project_id']);
        }

        return false;
    }
}