diff options
Diffstat (limited to 'lib/private/AppFramework/Bootstrap')
-rw-r--r-- | lib/private/AppFramework/Bootstrap/RegistrationContext.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/private/AppFramework/Bootstrap/RegistrationContext.php b/lib/private/AppFramework/Bootstrap/RegistrationContext.php index 120ee7ea9fa..6c51aafff9b 100644 --- a/lib/private/AppFramework/Bootstrap/RegistrationContext.php +++ b/lib/private/AppFramework/Bootstrap/RegistrationContext.php @@ -54,6 +54,7 @@ use OCP\Share\IPublicShareTemplateProvider; use OCP\SpeechToText\ISpeechToTextProvider; use OCP\Support\CrashReport\IReporter; use OCP\Talk\ITalkBackend; +use OCP\Teams\ITeamResourceProvider; use OCP\TextProcessing\IProvider as ITextProcessingProvider; use OCP\Translation\ITranslationProvider; use OCP\UserMigration\IMigrator as IUserMigrator; @@ -158,6 +159,9 @@ class RegistrationContext { /** @var PreviewProviderRegistration[] */ private array $previewProviders = []; + /** @var ServiceRegistration<ITeamResourceProvider>[] */ + private array $teamResourceProviders = []; + public function __construct(LoggerInterface $logger) { $this->logger = $logger; } @@ -357,6 +361,13 @@ class RegistrationContext { ); } + public function registerTeamResourceProvider(string $class) : void { + $this->context->registerTeamResourceProvider( + $this->appId, + $class + ); + } + public function registerCalendarRoomBackend(string $class): void { $this->context->registerCalendarRoomBackend( $this->appId, @@ -531,6 +542,17 @@ class RegistrationContext { ); } + + /** + * @psalm-param class-string<ITeamResourceProvider> $class + */ + public function registerTeamResourceProvider(string $appId, string $class) { + $this->teamResourceProviders[] = new ServiceRegistration( + $appId, + $class + ); + } + /** * @psalm-param class-string<IUserMigrator> $migratorClass */ @@ -870,4 +892,12 @@ class RegistrationContext { public function getSetupChecks(): array { return $this->setupChecks; } + + + /** + * @return ServiceRegistration<ITeamResourceProvider>[] + */ + public function getTeamResourceProviders(): array { + return $this->teamResourceProviders; + } } |