summaryrefslogtreecommitdiff
path: root/app/Event/ProjectModificationDate.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-10-12 21:38:56 -0400
committerFrédéric Guillot <fred@kanboard.net>2014-10-12 21:38:56 -0400
commit074056352de98fc567b4d13184c72887c75625d0 (patch)
tree7d262c3a5d5f779648f51aa0eb7d9f279c05d89d /app/Event/ProjectModificationDate.php
parent4061927d215c846ff8eb196301bf61532018042b (diff)
Project activity refactoring and listeners improvements
Diffstat (limited to 'app/Event/ProjectModificationDate.php')
-rw-r--r--app/Event/ProjectModificationDate.php63
1 files changed, 0 insertions, 63 deletions
diff --git a/app/Event/ProjectModificationDate.php b/app/Event/ProjectModificationDate.php
deleted file mode 100644
index 1b0b3736..00000000
--- a/app/Event/ProjectModificationDate.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-
-namespace Event;
-
-use Core\Listener;
-use Model\Project;
-
-/**
- * Project modification date listener
- *
- * Update the last modified field for a project
- *
- * @package event
- * @author Frederic Guillot
- */
-class ProjectModificationDate implements Listener
-{
- /**
- * Project model
- *
- * @accesss private
- * @var \Model\Project
- */
- private $project;
-
- /**
- * Constructor
- *
- * @access public
- * @param \Model\Project $project Project model instance
- */
- public function __construct(Project $project)
- {
- $this->project = $project;
- }
-
- /**
- * Return class information
- *
- * @access public
- * @return string
- */
- public function __toString()
- {
- return get_called_class();
- }
-
- /**
- * 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;
- }
-}