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 Creation
*
@@ -64,7 +66,7 @@ class TaskCreation extends Base
private function fireEvents($task_id, array $values)
{
$values['task_id'] = $task_id;
$this->event->trigger(Task::EVENT_CREATE_UPDATE, $values);
$this->event->trigger(Task::EVENT_CREATE, $values);
$this->container['dispatcher']->dispatch(Task::EVENT_CREATE_UPDATE, new TaskEvent($values));
$this->container['dispatcher']->dispatch(Task::EVENT_CREATE, new TaskEvent($values));
}
}