2929namespace  OCA \Files \Controller ;
3030
3131use  OCA \Files \Activity \Helper ;
32+ use  OCA \Files \Event \LoadAdditionalScriptsEvent ;
3233use  OCP \AppFramework \Controller ;
3334use  OCP \AppFramework \Http \ContentSecurityPolicy ;
34- use  OCP \AppFramework \Http \NotFoundResponse ;
3535use  OCP \AppFramework \Http \RedirectResponse ;
3636use  OCP \AppFramework \Http \Response ;
3737use  OCP \AppFramework \Http \TemplateResponse ;
3838use  OCP \App \IAppManager ;
39+ use  OCP \EventDispatcher \IEventDispatcher ;
3940use  OCP \Files \Folder ;
4041use  OCP \Files \IRootFolder ;
4142use  OCP \Files \NotFoundException ;
4445use  OCP \IRequest ;
4546use  OCP \IURLGenerator ;
4647use  OCP \IUserSession ;
47- use  Symfony \Component \EventDispatcher \EventDispatcherInterface ;
48- use  Symfony \Component \EventDispatcher \GenericEvent ;
4948
5049/** 
5150 * Class ViewController 
@@ -63,7 +62,7 @@ class ViewController extends Controller {
6362	protected  $ l10n
6463	/** @var IConfig */ 
6564	protected  $ config
66- 	/** @var EventDispatcherInterface  */ 
65+ 	/** @var IEventDispatcher  */ 
6766	protected  $ eventDispatcher
6867	/** @var IUserSession */ 
6968	protected  $ userSession
@@ -79,7 +78,7 @@ public function __construct(string $appName,
7978		IURLGenerator $ urlGenerator
8079		IL10N $ l10n
8180		IConfig $ config
82- 		EventDispatcherInterface   $ eventDispatcherInterface 
81+ 		IEventDispatcher   $ eventDispatcher 
8382		IUserSession $ userSession
8483		IAppManager $ appManager
8584		IRootFolder $ rootFolder
@@ -91,7 +90,7 @@ public function __construct(string $appName,
9190		$ this urlGenerator     = $ urlGenerator
9291		$ this l10n             = $ l10n
9392		$ this config           = $ config
94- 		$ this eventDispatcher  = $ eventDispatcherInterface 
93+ 		$ this eventDispatcher  = $ eventDispatcher 
9594		$ this userSession      = $ userSession
9695		$ this appManager       = $ appManager
9796		$ this rootFolder       = $ rootFolder
@@ -267,8 +266,8 @@ public function index($dir = '', $view = '', $fileid = null, $fileNotFound = fal
267266			];
268267		}
269268
270- 		$ eventnew  GenericEvent ( null , [ ' hiddenFields '  => []] );
271- 		$ this eventDispatcher ->dispatch (' OCA\Files::loadAdditionalScripts ' $ event
269+ 		$ eventnew  LoadAdditionalScriptsEvent ( );
270+ 		$ this eventDispatcher ->dispatch (LoadAdditionalScriptsEvent::class , $ event
272271
273272		$ params
274273		$ params'usedSpacePercent ' ]            = (int ) $ storageInfo'relative ' ];
@@ -285,7 +284,7 @@ public function index($dir = '', $view = '', $fileid = null, $fileNotFound = fal
285284		$ params'fileNotFound ' ]                = $ fileNotFound1  : 0 ;
286285		$ params'appNavigation ' ]               = $ nav
287286		$ params'appContents ' ]                 = $ contentItems
288- 		$ params'hiddenFields ' ]                = $ eventgetArgument ( ' hiddenFields ' 
287+ 		$ params'hiddenFields ' ]                = $ eventgetHiddenFields ( );
289288
290289		$ responsenew  TemplateResponse (
291290			$ this appName ,
0 commit comments