aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-08-11 09:34:48 +0200
committerGitHub <noreply@github.com>2020-08-11 09:34:48 +0200
commitbc4df68e561b2f8879657c9caa749e742cf08a70 (patch)
treeff46fa9c369f4791046472ff2c520fa705e6cc42 /apps/files
parent24982808011df9d6aa14ced2d8790a18f4e2e747 (diff)
parentc0be7e329f8a68ac70efb741a58530678c19a721 (diff)
downloadnextcloud-server-bc4df68e561b2f8879657c9caa749e742cf08a70.tar.gz
nextcloud-server-bc4df68e561b2f8879657c9caa749e742cf08a70.zip
Merge pull request #22169 from nextcloud/enh/noid/prefer-typed-events
Prefer typed event over string based ones
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/lib/Controller/ViewController.php5
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());