aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/AppFramework
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/AppFramework')
-rw-r--r--lib/private/AppFramework/Bootstrap/RegistrationContext.php22
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;
+ }
}