24 lines
504 B
PHP
24 lines
504 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace OCA\Retro\Listener;
|
|
|
|
use OCA\Files\Event\LoadAdditionalScriptsEvent;
|
|
use OCA\Retro\AppInfo\Application;
|
|
use OCP\EventDispatcher\Event;
|
|
use OCP\EventDispatcher\IEventListener;
|
|
use OCP\Util;
|
|
|
|
/**
|
|
* @implements IEventListener<Event>
|
|
*/
|
|
class LoadAdditionalScriptsListener implements IEventListener
|
|
{
|
|
public function handle(Event $event): void {
|
|
if ($event instanceof LoadAdditionalScriptsEvent) {
|
|
Util::addInitScript(Application::APP_ID, 'init');
|
|
}
|
|
}
|
|
}
|