From 47cd204686718c9388ec8be7c4fef7a5a3623edc Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Sun, 18 Jan 2015 15:23:19 +1100 Subject: [PATCH] Add event for backend, before running a controller --- modules/backend/classes/Controller.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/backend/classes/Controller.php b/modules/backend/classes/Controller.php index 6e4d3e8cf..76255fa00 100644 --- a/modules/backend/classes/Controller.php +++ b/modules/backend/classes/Controller.php @@ -157,6 +157,16 @@ class Controller extends Extendable $this->action = $action; $this->params = $params; + /* + * Extensibility + */ + if ( + ($event = $this->fireEvent('page.beforeDisplay', [$action, $params], true)) || + ($event = Event::fire('backend.page.beforeDisplay', [$this, $action, $params], true)) + ) { + return $event; + } + /* * Determine if this request is a public action. */