registerCapability(Capabilities::class); $context->registerEventListener( LoadAdditionalScriptsEvent::class, LoadAdditionalScripts::class ); $context->registerEventListener( LoadSidebar::class, LoadSidebarScripts::class ); $context->registerEventListener( CommentsEntityEvent::class, CommentsEntityEventListener::class ); $context->registerSearchProvider(CommentsSearchProvider::class); $context->registerInitialStateProvider(MaxAutoCompleteResultsInitialState::class); $context->registerNotifierService(Notifier::class); } public function boot(IBootContext $context): void { $context->injectFn(Closure::fromCallable([$this, 'registerCommentsEventHandler'])); $context->getServerContainer()->get(ISearch::class)->registerProvider(LegacyProvider::class, ['apps' => ['files']]); } protected function registerCommentsEventHandler(IServerContainer $container): void { $container->get(ICommentsManager::class)->registerEventHandler(function (): EventHandler { return $this->getContainer()->get(EventHandler::class); }); } }