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

@@ -4,7 +4,6 @@ namespace Model;
use SimpleValidator\Validator;
use SimpleValidator\Validators;
use Event\ProjectModificationDateListener;
use Core\Security;
/**
@@ -489,34 +488,4 @@ class Project extends Base
$v->getErrors()
);
}
/**
* Attach events
*
* @access public
*/
public function attachEvents()
{
$events = array(
Task::EVENT_CREATE_UPDATE,
Task::EVENT_CLOSE,
Task::EVENT_OPEN,
Task::EVENT_MOVE_COLUMN,
Task::EVENT_MOVE_POSITION,
Task::EVENT_ASSIGNEE_CHANGE,
GithubWebhook::EVENT_ISSUE_OPENED,
GithubWebhook::EVENT_ISSUE_CLOSED,
GithubWebhook::EVENT_ISSUE_REOPENED,
GithubWebhook::EVENT_ISSUE_ASSIGNEE_CHANGE,
GithubWebhook::EVENT_ISSUE_LABEL_CHANGE,
GithubWebhook::EVENT_ISSUE_COMMENT,
GithubWebhook::EVENT_COMMIT,
);
$listener = new ProjectModificationDateListener($this->container);
foreach ($events as $event_name) {
$this->event->attach($event_name, $listener);
}
}
}