2016-05-09 04:02:07 -04:00
|
|
|
<?php
|
|
|
|
|
/**
|
2024-05-27 11:39:07 -04:00
|
|
|
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2016-05-09 04:02:07 -04:00
|
|
|
*/
|
|
|
|
|
namespace OCA\Comments\AppInfo;
|
|
|
|
|
|
2020-05-27 09:14:40 -04:00
|
|
|
use OCA\Comments\Capabilities;
|
2020-06-05 10:17:22 -04:00
|
|
|
use OCA\Comments\Listener\CommentsEntityEventListener;
|
2024-06-18 08:11:32 -04:00
|
|
|
use OCA\Comments\Listener\CommentsEventListener;
|
2019-08-02 14:16:58 -04:00
|
|
|
use OCA\Comments\Listener\LoadAdditionalScripts;
|
2019-11-04 13:25:42 -05:00
|
|
|
use OCA\Comments\Listener\LoadSidebarScripts;
|
2021-03-09 15:04:31 -05:00
|
|
|
use OCA\Comments\MaxAutoCompleteResultsInitialState;
|
2018-07-18 04:12:22 -04:00
|
|
|
use OCA\Comments\Notification\Notifier;
|
2020-08-04 04:00:27 -04:00
|
|
|
use OCA\Comments\Search\CommentsSearchProvider;
|
2019-08-02 14:16:58 -04:00
|
|
|
use OCA\Files\Event\LoadAdditionalScriptsEvent;
|
2019-11-04 13:25:42 -05:00
|
|
|
use OCA\Files\Event\LoadSidebar;
|
2016-05-09 04:02:07 -04:00
|
|
|
use OCP\AppFramework\App;
|
2020-06-05 10:17:22 -04:00
|
|
|
use OCP\AppFramework\Bootstrap\IBootContext;
|
|
|
|
|
use OCP\AppFramework\Bootstrap\IBootstrap;
|
|
|
|
|
use OCP\AppFramework\Bootstrap\IRegistrationContext;
|
2018-07-18 04:12:22 -04:00
|
|
|
use OCP\Comments\CommentsEntityEvent;
|
2024-06-18 08:11:32 -04:00
|
|
|
use OCP\Comments\CommentsEvent;
|
2016-05-09 04:02:07 -04:00
|
|
|
|
2020-06-05 10:17:22 -04:00
|
|
|
class Application extends App implements IBootstrap {
|
2020-04-10 10:54:27 -04:00
|
|
|
public const APP_ID = 'comments';
|
2019-11-04 13:25:42 -05:00
|
|
|
|
2020-04-09 07:53:40 -04:00
|
|
|
public function __construct(array $urlParams = []) {
|
2019-11-04 13:25:42 -05:00
|
|
|
parent::__construct(self::APP_ID, $urlParams);
|
2016-05-09 04:02:07 -04:00
|
|
|
}
|
2018-07-18 04:12:22 -04:00
|
|
|
|
2020-06-05 10:17:22 -04:00
|
|
|
public function register(IRegistrationContext $context): void {
|
|
|
|
|
$context->registerCapability(Capabilities::class);
|
2019-11-04 13:25:42 -05:00
|
|
|
|
2020-06-05 10:17:22 -04:00
|
|
|
$context->registerEventListener(
|
|
|
|
|
LoadAdditionalScriptsEvent::class,
|
|
|
|
|
LoadAdditionalScripts::class
|
|
|
|
|
);
|
|
|
|
|
$context->registerEventListener(
|
|
|
|
|
LoadSidebar::class,
|
|
|
|
|
LoadSidebarScripts::class
|
|
|
|
|
);
|
|
|
|
|
$context->registerEventListener(
|
2023-07-11 05:06:29 -04:00
|
|
|
CommentsEntityEvent::class,
|
2020-06-05 10:17:22 -04:00
|
|
|
CommentsEntityEventListener::class
|
|
|
|
|
);
|
2024-06-18 08:11:32 -04:00
|
|
|
$context->registerEventListener(
|
|
|
|
|
CommentsEvent::class,
|
|
|
|
|
CommentsEventListener::class,
|
|
|
|
|
);
|
|
|
|
|
|
2020-08-04 04:00:27 -04:00
|
|
|
$context->registerSearchProvider(CommentsSearchProvider::class);
|
2021-03-09 15:04:31 -05:00
|
|
|
|
|
|
|
|
$context->registerInitialStateProvider(MaxAutoCompleteResultsInitialState::class);
|
2021-04-16 06:39:08 -04:00
|
|
|
|
|
|
|
|
$context->registerNotifierService(Notifier::class);
|
2018-07-18 04:12:22 -04:00
|
|
|
}
|
|
|
|
|
|
2020-06-05 10:17:22 -04:00
|
|
|
public function boot(IBootContext $context): void {
|
2018-07-18 04:12:22 -04:00
|
|
|
}
|
2016-05-09 04:02:07 -04:00
|
|
|
}
|