Refactoring of internal task events

This commit is contained in:
Frederic Guillot
2016-07-19 22:38:30 -04:00
parent d9d3788222
commit 390082aa41
58 changed files with 1210 additions and 468 deletions

View File

@@ -2,8 +2,6 @@
namespace Kanboard\Model;
use Kanboard\Event\TaskEvent;
/**
* Task Project Move
*
@@ -32,9 +30,8 @@ class TaskProjectMoveModel extends TaskDuplicationModel
$this->checkDestinationProjectValues($values);
$this->tagDuplicationModel->syncTaskTagsToAnotherProject($task_id, $project_id);
if ($this->db->table(TaskModel::TABLE)->eq('id', $task['id'])->update($values)) {
$event = new TaskEvent(array_merge($task, $values, array('task_id' => $task['id'])));
$this->dispatcher->dispatch(TaskModel::EVENT_MOVE_PROJECT, $event);
if ($this->db->table(TaskModel::TABLE)->eq('id', $task_id)->update($values)) {
$this->queueManager->push($this->taskEventJob->withParams($task_id, array(TaskModel::EVENT_MOVE_PROJECT), $values));
}
return true;