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 Position
*
@@ -139,13 +141,13 @@ class TaskPosition extends Base
);
if ($task['swimlane_id'] != $new_swimlane_id) {
$this->event->trigger(Task::EVENT_MOVE_SWIMLANE, $event_data);
$this->container['dispatcher']->dispatch(Task::EVENT_MOVE_SWIMLANE, new TaskEvent($event_data));
}
else if ($task['column_id'] != $new_column_id) {
$this->event->trigger(Task::EVENT_MOVE_COLUMN, $event_data);
$this->container['dispatcher']->dispatch(Task::EVENT_MOVE_COLUMN, new TaskEvent($event_data));
}
else if ($task['position'] != $new_position) {
$this->event->trigger(Task::EVENT_MOVE_POSITION, $event_data);
$this->container['dispatcher']->dispatch(Task::EVENT_MOVE_POSITION, new TaskEvent($event_data));
}
}