retro/lib/Listener/LoadAdditionalScriptsListener.php
Michel Roux c8d5e899f7
Some checks failed
retro / xml (push) Successful in 27s
retro / php (push) Failing after 1m15s
retro / nodejs (push) Failing after 1m40s
retro / release (push) Has been skipped
feat: 🌱 include script ok
2025-01-03 22:50:29 +01:00

24 lines
525 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, Application::APP_ID.'-init');
}
}
}