diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2020-03-15 17:32:50 +0100 |
---|---|---|
committer | npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com> | 2020-03-16 11:37:38 +0000 |
commit | e44b58ed8b26ecc9bb7da7f6292f0a3977a882bc (patch) | |
tree | 6c2b59a359b7a93b667d2fe2908f2b5983897487 /apps/workflowengine/lib/Settings/ASettings.php | |
parent | 48bdd322a210e5e80ad1bb80ecbe86fad5ba28d1 (diff) | |
download | nextcloud-server-e44b58ed8b26ecc9bb7da7f6292f0a3977a882bc.tar.gz nextcloud-server-e44b58ed8b26ecc9bb7da7f6292f0a3977a882bc.zip |
Hide card for apps store if disabled
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
Diffstat (limited to 'apps/workflowengine/lib/Settings/ASettings.php')
-rw-r--r-- | apps/workflowengine/lib/Settings/ASettings.php | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/apps/workflowengine/lib/Settings/ASettings.php b/apps/workflowengine/lib/Settings/ASettings.php index ac2ebdb8cac..a535d21ecdf 100644 --- a/apps/workflowengine/lib/Settings/ASettings.php +++ b/apps/workflowengine/lib/Settings/ASettings.php @@ -27,6 +27,7 @@ namespace OCA\WorkflowEngine\Settings; use OCA\WorkflowEngine\AppInfo\Application; use OCA\WorkflowEngine\Manager; use OCP\AppFramework\Http\TemplateResponse; +use OCP\IConfig; use OCP\IInitialStateService; use OCP\IL10N; use OCP\Settings\ISettings; @@ -54,23 +55,31 @@ abstract class ASettings implements ISettings { /** @var IInitialStateService */ private $initialStateService; + /** @var IConfig */ + private $config; + /** * @param string $appName * @param IL10N $l * @param EventDispatcherInterface $eventDispatcher + * @param Manager $manager + * @param IInitialStateService $initialStateService + * @param IConfig $config */ public function __construct( $appName, IL10N $l, EventDispatcherInterface $eventDispatcher, Manager $manager, - IInitialStateService $initialStateService + IInitialStateService $initialStateService, + IConfig $config ) { $this->appName = $appName; $this->l10n = $l; $this->eventDispatcher = $eventDispatcher; $this->manager = $manager; $this->initialStateService = $initialStateService; + $this->config = $config; } abstract function getScope(): int; @@ -108,6 +117,12 @@ abstract class ASettings implements ISettings { $this->getScope() ); + $this->initialStateService->provideInitialState( + Application::APP_ID, + 'appstoreenabled', + $this->config->getSystemValueBool('appstoreenabled', true) + ); + return new TemplateResponse(Application::APP_ID, 'settings', [], 'blank'); } |