aboutsummaryrefslogtreecommitdiffstats
path: root/apps/workflowengine/lib/Settings/ASettings.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/workflowengine/lib/Settings/ASettings.php')
-rw-r--r--apps/workflowengine/lib/Settings/ASettings.php22
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(