Move events handling to Symfony\EventDispatcher

This commit is contained in:
Frédéric Guillot
2014-12-27 19:10:38 -05:00
parent cf821e117c
commit 17dc5bdc9e
75 changed files with 1076 additions and 1167 deletions

View File

@@ -2,6 +2,8 @@
namespace Model;
use Event\TaskEvent;
/**
* Task Duplication
*
@@ -84,7 +86,14 @@ class TaskDuplication extends Base
$this->checkDestinationProjectValues($values);
return $this->db->table(Task::TABLE)->eq('id', $task['id'])->update($values);
if ($this->db->table(Task::TABLE)->eq('id', $task['id'])->update($values)) {
$this->container['dispatcher']->dispatch(
Task::EVENT_MOVE_PROJECT,
new TaskEvent(array_merge($task, $values, array('task_id' => $task['id'])))
);
}
return true;
}
/**