diff options
| author | Frédéric Guillot <fred@kanboard.net> | 2014-12-27 19:10:38 -0500 |
|---|---|---|
| committer | Frédéric Guillot <fred@kanboard.net> | 2014-12-27 19:10:38 -0500 |
| commit | 17dc5bdc9ede52ad618bbf326e67e3b6988170f7 (patch) | |
| tree | 9cf4d325667f11fa735bca84042fb385e3273329 /app/Event/ProjectActivityListener.php | |
| parent | cf821e117ce8b937cff7f386a107aaa81ba6bf9b (diff) | |
Move events handling to Symfony\EventDispatcher
Diffstat (limited to 'app/Event/ProjectActivityListener.php')
| -rw-r--r-- | app/Event/ProjectActivityListener.php | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/app/Event/ProjectActivityListener.php b/app/Event/ProjectActivityListener.php deleted file mode 100644 index 75efe65d..00000000 --- a/app/Event/ProjectActivityListener.php +++ /dev/null @@ -1,61 +0,0 @@ -<?php - -namespace Event; - -/** - * Project activity listener - * - * @package event - * @author Frederic Guillot - */ -class ProjectActivityListener 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['task_id'])) { - - $values = $this->getValues($data); - - return $this->projectActivity->createEvent( - $values['task']['project_id'], - $values['task']['id'], - $this->acl->getUserId(), - $this->container['event']->getLastTriggeredEvent(), - $values - ); - } - - return false; - } - - /** - * Get event activity data - * - * @access private - * @param array $data Event data dictionary - * @return array - */ - private function getValues(array $data) - { - $values = array(); - $values['task'] = $this->taskFinder->getDetails($data['task_id']); - - switch ($this->getEventNamespace()) { - case 'subtask': - $values['subtask'] = $this->subTask->getById($data['id'], true); - break; - case 'comment': - $values['comment'] = $this->comment->getById($data['id']); - break; - } - - return $values; - } -} |
