diff options
author | Anna Larch <anna@nextcloud.com> | 2021-09-27 14:58:16 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2021-10-14 08:22:24 +0200 |
commit | a58d1e6b06d553927ff6b80822074e640ee66a9c (patch) | |
tree | 27472486e3dd55dca6311e7c9ad131d050156b6d /lib/private/AppFramework | |
parent | b7ee885f930c32ab5412208a0e6cc13650735663 (diff) | |
download | nextcloud-server-a58d1e6b06d553927ff6b80822074e640ee66a9c.tar.gz nextcloud-server-a58d1e6b06d553927ff6b80822074e640ee66a9c.zip |
Add Public Calendar Provider
Signed-off-by: Anna Larch <anna@nextcloud.com>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/AppFramework')
-rw-r--r-- | lib/private/AppFramework/Bootstrap/RegistrationContext.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/private/AppFramework/Bootstrap/RegistrationContext.php b/lib/private/AppFramework/Bootstrap/RegistrationContext.php index 30ac63281d1..8eed6a5bde4 100644 --- a/lib/private/AppFramework/Bootstrap/RegistrationContext.php +++ b/lib/private/AppFramework/Bootstrap/RegistrationContext.php @@ -35,6 +35,7 @@ use OCP\AppFramework\Bootstrap\IRegistrationContext; use OCP\AppFramework\Middleware; use OCP\AppFramework\Services\InitialStateProvider; use OCP\Authentication\IAlternativeLogin; +use OCP\Calendar\ICalendarProvider; use OCP\Capabilities\ICapability; use OCP\Dashboard\IManager; use OCP\Dashboard\IWidget; @@ -95,6 +96,9 @@ class RegistrationContext { /** @var ServiceRegistration<\OCP\Authentication\TwoFactorAuth\IProvider>[] */ private $twoFactorProviders = []; + /** @var ServiceRegistration<ICalendarProvider>[] */ + private $calendarProviders = []; + /** @var LoggerInterface */ private $logger; @@ -225,6 +229,13 @@ class RegistrationContext { $twoFactorProviderClass ); } + + public function registerCalendarProvider(string $class): void { + $this->context->registerCalendarProvider( + $this->appId, + $class + ); + } }; } @@ -300,6 +311,10 @@ class RegistrationContext { $this->twoFactorProviders[] = new ServiceRegistration($appId, $class); } + public function registerCalendarProvider(string $appId, string $class): void { + $this->calendarProviders[] = new ServiceRegistration($appId, $class); + } + /** * @param App[] $apps */ @@ -530,4 +545,11 @@ class RegistrationContext { public function getTwoFactorProviders(): array { return $this->twoFactorProviders; } + + /** + * @return ServiceRegistration<ICalendarProvider>[] + */ + public function getCalendarProviders(): array { + return $this->calendarProviders; + } } |