diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2020-06-19 01:16:53 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2020-06-19 23:03:07 +0200 |
commit | 3706eae7771367196c53085a1e6352ab0ef885c4 (patch) | |
tree | 35a149540af01dc7ae444de4cc6d1f84944b4f22 /apps/workflowengine/lib/Settings | |
parent | 4cff3a3a86b726f1863da9196d8a7cb2a425785f (diff) | |
download | nextcloud-server-3706eae7771367196c53085a1e6352ab0ef885c4.tar.gz nextcloud-server-3706eae7771367196c53085a1e6352ab0ef885c4.zip |
flow to not use deprecated event dispatcher methods
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/workflowengine/lib/Settings')
-rw-r--r-- | apps/workflowengine/lib/Settings/ASettings.php | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/apps/workflowengine/lib/Settings/ASettings.php b/apps/workflowengine/lib/Settings/ASettings.php index a3f2ad2495f..3d704e662ee 100644 --- a/apps/workflowengine/lib/Settings/ASettings.php +++ b/apps/workflowengine/lib/Settings/ASettings.php @@ -28,17 +28,18 @@ namespace OCA\WorkflowEngine\Settings; use OCA\WorkflowEngine\AppInfo\Application; use OCA\WorkflowEngine\Manager; use OCP\AppFramework\Http\TemplateResponse; +use OCP\EventDispatcher\IEventDispatcher; use OCP\IConfig; use OCP\IInitialStateService; use OCP\IL10N; use OCP\Settings\ISettings; +use OCP\WorkflowEngine\Events\LoadSettingsScriptsEvent; use OCP\WorkflowEngine\ICheck; use OCP\WorkflowEngine\IComplexOperation; use OCP\WorkflowEngine\IEntity; use OCP\WorkflowEngine\IEntityEvent; use OCP\WorkflowEngine\IOperation; use OCP\WorkflowEngine\ISpecificOperation; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; abstract class ASettings implements ISettings { /** @var IL10N */ @@ -47,7 +48,7 @@ abstract class ASettings implements ISettings { /** @var string */ private $appName; - /** @var EventDispatcherInterface */ + /** @var IEventDispatcher */ private $eventDispatcher; /** @var Manager */ @@ -59,18 +60,10 @@ abstract class ASettings implements ISettings { /** @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, + string $appName, IL10N $l, - EventDispatcherInterface $eventDispatcher, + IEventDispatcher $eventDispatcher, Manager $manager, IInitialStateService $initialStateService, IConfig $config @@ -89,7 +82,10 @@ abstract class ASettings implements ISettings { * @return TemplateResponse */ public function getForm() { - $this->eventDispatcher->dispatch('OCP\WorkflowEngine::loadAdditionalSettingScripts'); + $this->eventDispatcher->dispatch( + 'OCP\WorkflowEngine::loadAdditionalSettingScripts', + new LoadSettingsScriptsEvent() + ); $entities = $this->manager->getEntitiesList(); $this->initialStateService->provideInitialState( |