aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/AppFramework/Bootstrap/RegistrationContext.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/AppFramework/Bootstrap/RegistrationContext.php')
-rw-r--r--lib/private/AppFramework/Bootstrap/RegistrationContext.php23
1 files changed, 22 insertions, 1 deletions
diff --git a/lib/private/AppFramework/Bootstrap/RegistrationContext.php b/lib/private/AppFramework/Bootstrap/RegistrationContext.php
index d6271f5ce45..d2dc365d835 100644
--- a/lib/private/AppFramework/Bootstrap/RegistrationContext.php
+++ b/lib/private/AppFramework/Bootstrap/RegistrationContext.php
@@ -77,6 +77,9 @@ class RegistrationContext {
/** @var array[] */
private $wellKnownHandlers = [];
+ /** @var array[] */
+ private $templateProviders = [];
+
/** @var ILogger */
private $logger;
@@ -186,6 +189,13 @@ class RegistrationContext {
$class
);
}
+
+ public function registerTemplateProvider(string $providerClass): void {
+ $this->context->registerTemplateProvider(
+ $this->appId,
+ $providerClass
+ );
+ }
};
}
@@ -279,6 +289,13 @@ class RegistrationContext {
];
}
+ public function registerTemplateProvider(string $appId, string $class): void {
+ $this->templateProviders[] = [
+ 'appId' => $appId,
+ 'class' => $class,
+ ];
+ }
+
/**
* @param App[] $apps
*/
@@ -451,7 +468,7 @@ class RegistrationContext {
}
/**
- * @erturn array[]
+ * @return array[]
*/
public function getInitialStates(): array {
return $this->initialStates;
@@ -463,4 +480,8 @@ class RegistrationContext {
public function getWellKnownHandlers(): array {
return $this->wellKnownHandlers;
}
+
+ public function getTemplateProviders(): array {
+ return $this->templateProviders;
+ }
}