diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-08-10 14:29:21 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-08-10 15:22:55 +0200 |
commit | c0be7e329f8a68ac70efb741a58530678c19a721 (patch) | |
tree | 49814c1be13ec6fef64227e930a8530c093c5db6 /apps/files/lib/Controller | |
parent | 9c1ee2e0ba84e7ad1f707bdf6080ec3df1680040 (diff) | |
download | nextcloud-server-c0be7e329f8a68ac70efb741a58530678c19a721.tar.gz nextcloud-server-c0be7e329f8a68ac70efb741a58530678c19a721.zip |
Prefer typed event over string based ones
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/files/lib/Controller')
-rw-r--r-- | apps/files/lib/Controller/ViewController.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php index 73ee589fdbc..1568e0c9f54 100644 --- a/apps/files/lib/Controller/ViewController.php +++ b/apps/files/lib/Controller/ViewController.php @@ -278,9 +278,8 @@ class ViewController extends Controller { } $event = new LoadAdditionalScriptsEvent(); - $this->eventDispatcher->dispatch(LoadAdditionalScriptsEvent::class, $event); - - $this->eventDispatcher->dispatch(LoadSidebar::class, new LoadSidebar()); + $this->eventDispatcher->dispatchTyped($event); + $this->eventDispatcher->dispatchTyped(new LoadSidebar()); // Load Viewer scripts if (class_exists(LoadViewer::class)) { $this->eventDispatcher->dispatchTyped(new LoadViewer()); |