diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-12-27 19:10:38 -0500 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-12-27 19:10:38 -0500 |
commit | 17dc5bdc9ede52ad618bbf326e67e3b6988170f7 (patch) | |
tree | 9cf4d325667f11fa735bca84042fb385e3273329 /app/Controller | |
parent | cf821e117ce8b937cff7f386a107aaa81ba6bf9b (diff) |
Move events handling to Symfony\EventDispatcher
Diffstat (limited to 'app/Controller')
-rw-r--r-- | app/Controller/Base.php | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/app/Controller/Base.php b/app/Controller/Base.php index 5b99e6b8..8330f6d5 100644 --- a/app/Controller/Base.php +++ b/app/Controller/Base.php @@ -3,7 +3,6 @@ namespace Controller; use Pimple\Container; -use Core\Tool; use Core\Security; use Core\Request; use Core\Response; @@ -129,7 +128,7 @@ abstract class Base */ public function __get($name) { - return Tool::loadModel($this->container, $name); + return $this->container[$name]; } /** @@ -156,9 +155,6 @@ abstract class Base $this->response->hsts(); } - $this->config->setupTranslations(); - $this->config->setupTimezone(); - // Authentication if (! $this->authentication->isAuthenticated($controller, $action)) { @@ -173,30 +169,6 @@ abstract class Base if (! $this->acl->isPageAccessAllowed($controller, $action)) { $this->response->redirect('?controller=user&action=forbidden'); } - - // Attach events - $this->attachEvents(); - } - - /** - * Attach events - * - * @access private - */ - private function attachEvents() - { - $models = array( - 'projectActivity', // Order is important - 'projectDailySummary', - 'action', - 'project', - 'webhook', - 'notification', - ); - - foreach ($models as $model) { - $this->$model->attachEvents(); - } } /** |