diff --git a/apps/files/lib/Listener/LegacyLoadAdditionalScriptsAdapter.php b/apps/files/lib/Listener/LegacyLoadAdditionalScriptsAdapter.php index d5adfaa85db6b..ba89d59122770 100644 --- a/apps/files/lib/Listener/LegacyLoadAdditionalScriptsAdapter.php +++ b/apps/files/lib/Listener/LegacyLoadAdditionalScriptsAdapter.php @@ -24,17 +24,18 @@ namespace OCA\Files\Listener; +use OC\EventDispatcher\SymfonyAdapter; use OCA\Files\Event\LoadAdditionalScriptsEvent; use OCP\EventDispatcher\Event; -use OCP\EventDispatcher\IEventDispatcher; use OCP\EventDispatcher\IEventListener; +use Symfony\Component\EventDispatcher\GenericEvent; class LegacyLoadAdditionalScriptsAdapter implements IEventListener { - /** @var IEventDispatcher */ + /** @var SymfonyAdapter */ private $dispatcher; - public function __construct(IEventDispatcher $dispatcher) { + public function __construct(SymfonyAdapter $dispatcher) { $this->dispatcher = $dispatcher; } @@ -43,7 +44,7 @@ public function handle(Event $event): void { return; } - $legacyEvent = new Event(null, ['hiddenFields' => []]); + $legacyEvent = new GenericEvent(null, ['hiddenFields' => []]); $this->dispatcher->dispatch('OCA\Files::loadAdditionalScripts', $legacyEvent); $hiddenFields = $legacyEvent->getArgument('hiddenFields');