2023-07-31 15:10:50 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
/**
|
2024-05-29 05:32:54 -04:00
|
|
|
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2023-07-31 15:10:50 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
namespace OCA\FilesReminders\AppInfo;
|
|
|
|
|
|
2024-02-14 20:05:38 -05:00
|
|
|
use OCA\DAV\Events\SabrePluginAddEvent;
|
2023-08-02 22:15:00 -04:00
|
|
|
use OCA\Files\Event\LoadAdditionalScriptsEvent;
|
|
|
|
|
use OCA\FilesReminders\Listener\LoadAdditionalScriptsListener;
|
2023-07-31 20:27:02 -04:00
|
|
|
use OCA\FilesReminders\Listener\NodeDeletedListener;
|
2024-02-14 20:05:38 -05:00
|
|
|
use OCA\FilesReminders\Listener\SabrePluginAddListener;
|
2023-08-03 18:42:14 -04:00
|
|
|
use OCA\FilesReminders\Listener\UserDeletedListener;
|
2023-07-31 15:10:50 -04:00
|
|
|
use OCA\FilesReminders\Notification\Notifier;
|
2025-04-04 10:02:00 -04:00
|
|
|
use OCA\FilesReminders\SetupChecks\NeedNotificationsApp;
|
2023-07-31 15:10:50 -04:00
|
|
|
use OCP\AppFramework\App;
|
|
|
|
|
use OCP\AppFramework\Bootstrap\IBootContext;
|
|
|
|
|
use OCP\AppFramework\Bootstrap\IBootstrap;
|
|
|
|
|
use OCP\AppFramework\Bootstrap\IRegistrationContext;
|
2023-07-31 20:27:02 -04:00
|
|
|
use OCP\Files\Events\Node\NodeDeletedEvent;
|
2023-08-03 18:42:14 -04:00
|
|
|
use OCP\User\Events\UserDeletedEvent;
|
2023-07-31 15:10:50 -04:00
|
|
|
|
|
|
|
|
class Application extends App implements IBootstrap {
|
|
|
|
|
public const APP_ID = 'files_reminders';
|
|
|
|
|
|
|
|
|
|
public function __construct() {
|
|
|
|
|
parent::__construct(static::APP_ID);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function boot(IBootContext $context): void {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function register(IRegistrationContext $context): void {
|
|
|
|
|
$context->registerNotifierService(Notifier::class);
|
2023-08-03 18:42:14 -04:00
|
|
|
|
2024-02-14 20:05:38 -05:00
|
|
|
$context->registerEventListener(SabrePluginAddEvent::class, SabrePluginAddListener::class);
|
|
|
|
|
|
2023-07-31 20:27:02 -04:00
|
|
|
$context->registerEventListener(NodeDeletedEvent::class, NodeDeletedListener::class);
|
2023-08-03 18:42:14 -04:00
|
|
|
$context->registerEventListener(UserDeletedEvent::class, UserDeletedListener::class);
|
2023-08-02 22:15:00 -04:00
|
|
|
|
|
|
|
|
$context->registerEventListener(LoadAdditionalScriptsEvent::class, LoadAdditionalScriptsListener::class);
|
2025-04-01 09:19:43 -04:00
|
|
|
|
|
|
|
|
$context->registerSetupCheck(NeedNotificationsApp::class);
|
2023-07-31 15:10:50 -04:00
|
|
|
}
|
|
|
|
|
}
|