diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-05-19 18:35:32 +0200 |
---|---|---|
committer | nextcloud-command <nextcloud-command@users.noreply.github.com> | 2022-05-31 08:38:50 +0000 |
commit | 30d7763edce177a608cfdc987a38ff1658eba168 (patch) | |
tree | 00f081436990b900bcd54e1d3b5a64b55dd649ad /apps/workflowengine/lib | |
parent | cf9660fdf055cbc12d7c06f641843f1c3754f797 (diff) | |
download | nextcloud-server-30d7763edce177a608cfdc987a38ff1658eba168.tar.gz nextcloud-server-30d7763edce177a608cfdc987a38ff1658eba168.zip |
Use SettingsSection in workflowengine settings
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'apps/workflowengine/lib')
-rw-r--r-- | apps/workflowengine/lib/Settings/ASettings.php | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/apps/workflowengine/lib/Settings/ASettings.php b/apps/workflowengine/lib/Settings/ASettings.php index d35524727a8..f3cb8d76bba 100644 --- a/apps/workflowengine/lib/Settings/ASettings.php +++ b/apps/workflowengine/lib/Settings/ASettings.php @@ -37,6 +37,7 @@ use OCP\AppFramework\Services\IInitialState; use OCP\EventDispatcher\IEventDispatcher; use OCP\IConfig; use OCP\IL10N; +use OCP\IURLGenerator; use OCP\Settings\ISettings; use OCP\WorkflowEngine\Events\LoadSettingsScriptsEvent; use OCP\WorkflowEngine\ICheck; @@ -47,23 +48,13 @@ use OCP\WorkflowEngine\IOperation; use OCP\WorkflowEngine\ISpecificOperation; abstract class ASettings implements ISettings { - /** @var IL10N */ - private $l10n; - - /** @var string */ - private $appName; - - /** @var IEventDispatcher */ - private $eventDispatcher; - - /** @var Manager */ - protected $manager; - - /** @var IInitialState */ - private $initialStateService; - - /** @var IConfig */ - private $config; + private IL10N $l10n; + private string $appName; + private IEventDispatcher $eventDispatcher; + protected Manager $manager; + private IInitialState $initialStateService; + private IConfig $config; + private IURLGenerator $urlGenerator; public function __construct( string $appName, @@ -71,7 +62,8 @@ abstract class ASettings implements ISettings { IEventDispatcher $eventDispatcher, Manager $manager, IInitialState $initialStateService, - IConfig $config + IConfig $config, + IURLGenerator $urlGenerator ) { $this->appName = $appName; $this->l10n = $l; @@ -79,6 +71,7 @@ abstract class ASettings implements ISettings { $this->manager = $manager; $this->initialStateService = $initialStateService; $this->config = $config; + $this->urlGenerator = $urlGenerator; } abstract public function getScope(): int; @@ -122,6 +115,11 @@ abstract class ASettings implements ISettings { $this->config->getSystemValueBool('appstoreenabled', true) ); + $this->initialStateService->provideInitialState( + 'doc-url', + $this->urlGenerator->linkToDocs('admin-workflowengine') + ); + return new TemplateResponse(Application::APP_ID, 'settings', [], 'blank'); } |