diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2020-10-03 15:47:38 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2020-10-04 09:35:33 +0200 |
commit | f865a3a1c2405af5c649b6d78f95b93ed60ba04f (patch) | |
tree | c7194750f2c4c88be23b0cd4ec508a59d8b61d0b /lib/private/AppFramework/Bootstrap/RegistrationContext.php | |
parent | eba83d22bbcf45caf400704b8794acce180c5ba9 (diff) | |
download | nextcloud-server-f865a3a1c2405af5c649b6d78f95b93ed60ba04f.tar.gz nextcloud-server-f865a3a1c2405af5c649b6d78f95b93ed60ba04f.zip |
Move initial state provider to boostrap
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/AppFramework/Bootstrap/RegistrationContext.php')
-rw-r--r-- | lib/private/AppFramework/Bootstrap/RegistrationContext.php | 24 |
1 files changed, 24 insertions, 0 deletions
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; + } } |