mirror of
https://github.com/nextcloud/tables.git
synced 2025-08-15 21:34:24 +00:00
28 lines
720 B
PHP
28 lines
720 B
PHP
<?php
|
|
|
|
/**
|
|
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
namespace OCA\Tables\Listener;
|
|
|
|
use OCA\Tables\AppInfo\Application;
|
|
use OCP\Collaboration\Resources\LoadAdditionalScriptsEvent;
|
|
use OCP\EventDispatcher\Event;
|
|
use OCP\EventDispatcher\IEventListener;
|
|
use OCP\Util;
|
|
|
|
/** @template-implements IEventListener<LoadAdditionalScriptsEvent> */
|
|
class LoadAdditionalListener implements IEventListener {
|
|
public function handle(Event $event): void {
|
|
if (!($event instanceof LoadAdditionalScriptsEvent)) {
|
|
return;
|
|
}
|
|
|
|
if (method_exists(Util::class, 'addInitScript')) {
|
|
Util::addInitScript(Application::APP_ID, 'tables-files');
|
|
}
|
|
}
|
|
}
|