initialState->provideInitialState( 'workspace_available', $this->configService->isRichWorkspaceAvailable() ); $this->initialState->provideInitialState( 'workspace_enabled', $this->configService->isRichWorkspaceEnabledForUser($this->userId) ); $this->initialState->provideInitialState( 'default_file_extension', $this->configService->getDefaultFileExtension() ); $this->initialState->provideInitialState( 'rich_editing_enabled', $this->configService->isRichEditingEnabled() ); $this->initialState->provideInitialState( 'translation_can_detect', $this->translationManager->canDetectLanguage() ); $this->initialState->provideInitialState( 'translation_languages', $this->translationManager->getLanguages() ); $this->initialState->provideInitialState( 'textprocessing', array_map(function (string $className) { /** @var class-string $className */ $type = \OCP\Server::get($className); return [ 'task' => $className, 'name' => $type->getName(), ]; }, $this->textProcessingManager->getAvailableTaskTypes()), ); } public function provideFileId(int $fileId): void { $this->initialState->provideInitialState('file_id', $fileId); } }