diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-10-12 21:38:56 -0400 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-10-12 21:38:56 -0400 |
commit | 074056352de98fc567b4d13184c72887c75625d0 (patch) | |
tree | 7d262c3a5d5f779648f51aa0eb7d9f279c05d89d /app/Event/ProjectModificationDateListener.php | |
parent | 4061927d215c846ff8eb196301bf61532018042b (diff) |
Project activity refactoring and listeners improvements
Diffstat (limited to 'app/Event/ProjectModificationDateListener.php')
-rw-r--r-- | app/Event/ProjectModificationDateListener.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/app/Event/ProjectModificationDateListener.php b/app/Event/ProjectModificationDateListener.php new file mode 100644 index 00000000..abc176b0 --- /dev/null +++ b/app/Event/ProjectModificationDateListener.php @@ -0,0 +1,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; + } +} |