From f865a3a1c2405af5c649b6d78f95b93ed60ba04f Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Sat, 3 Oct 2020 15:47:38 +0200 Subject: Move initial state provider to boostrap Signed-off-by: Roeland Jago Douma --- .../AppFramework/Bootstrap/RegistrationContext.php | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'lib/private/AppFramework') diff --git a/lib/private/AppFramework/Bootstrap/RegistrationContext.php b/lib/private/AppFramework/Bootstrap/RegistrationContext.php index 1ed2dac4c45..0f408380e88 100644 --- a/lib/private/AppFramework/Bootstrap/RegistrationContext.php +++ b/lib/private/AppFramework/Bootstrap/RegistrationContext.php @@ -69,6 +69,9 @@ class RegistrationContext { /** @var array[] */ private $alternativeLogins = []; + /** @var array[] */ + private $initialStates = []; + /** @var ILogger */ private $logger; @@ -164,6 +167,13 @@ class RegistrationContext { $class ); } + + public function registerInitialStateProvider(string $class): void { + $this->context->registerInitialState( + $this->appId, + $class + ); + } }; } @@ -243,6 +253,13 @@ class RegistrationContext { ]; } + public function registerInitialState(string $appId, string $class): void { + $this->initialStates[] = [ + 'appId' => $appId, + 'class' => $class, + ]; + } + /** * @param App[] $apps */ @@ -413,4 +430,11 @@ class RegistrationContext { public function getAlternativeLogins(): array { return $this->alternativeLogins; } + + /** + * @erturn array[] + */ + public function getInitialStates(): array { + return $this->initialStates; + } } -- cgit v1.2.3