|
|
|
@ -66,8 +66,6 @@ use OCP\WorkflowEngine\IEntityEvent; |
|
|
|
|
use OCP\WorkflowEngine\IManager; |
|
|
|
|
use OCP\WorkflowEngine\IOperation; |
|
|
|
|
use OCP\WorkflowEngine\IRuleMatcher; |
|
|
|
|
use Symfony\Component\EventDispatcher\EventDispatcherInterface as LegacyDispatcher; |
|
|
|
|
use Symfony\Component\EventDispatcher\GenericEvent; |
|
|
|
|
|
|
|
|
|
class Manager implements IManager { |
|
|
|
|
/** @var IStorage */ |
|
|
|
@ -94,9 +92,6 @@ class Manager implements IManager { |
|
|
|
|
/** @var IL10N */ |
|
|
|
|
protected $l; |
|
|
|
|
|
|
|
|
|
/** @var LegacyDispatcher */ |
|
|
|
|
protected $legacyEventDispatcher; |
|
|
|
|
|
|
|
|
|
/** @var IEntity[] */ |
|
|
|
|
protected $registeredEntities = []; |
|
|
|
|
|
|
|
|
@ -126,7 +121,6 @@ class Manager implements IManager { |
|
|
|
|
IDBConnection $connection, |
|
|
|
|
IServerContainer $container, |
|
|
|
|
IL10N $l, |
|
|
|
|
LegacyDispatcher $eventDispatcher, |
|
|
|
|
ILogger $logger, |
|
|
|
|
IUserSession $session, |
|
|
|
|
IEventDispatcher $dispatcher, |
|
|
|
@ -136,7 +130,6 @@ class Manager implements IManager { |
|
|
|
|
$this->connection = $connection; |
|
|
|
|
$this->container = $container; |
|
|
|
|
$this->l = $l; |
|
|
|
|
$this->legacyEventDispatcher = $eventDispatcher; |
|
|
|
|
$this->logger = $logger; |
|
|
|
|
$this->operationsByScope = new CappedMemoryCache(64); |
|
|
|
|
$this->session = $session; |
|
|
|
@ -694,7 +687,6 @@ class Manager implements IManager { |
|
|
|
|
*/ |
|
|
|
|
public function getEntitiesList(): array { |
|
|
|
|
$this->dispatcher->dispatchTyped(new RegisterEntitiesEvent($this)); |
|
|
|
|
$this->legacyEventDispatcher->dispatch(IManager::EVENT_NAME_REG_ENTITY, new GenericEvent($this)); |
|
|
|
|
|
|
|
|
|
return array_values(array_merge($this->getBuildInEntities(), $this->registeredEntities)); |
|
|
|
|
} |
|
|
|
@ -704,7 +696,6 @@ class Manager implements IManager { |
|
|
|
|
*/ |
|
|
|
|
public function getOperatorList(): array { |
|
|
|
|
$this->dispatcher->dispatchTyped(new RegisterOperationsEvent($this)); |
|
|
|
|
$this->legacyEventDispatcher->dispatch(IManager::EVENT_NAME_REG_OPERATION, new GenericEvent($this)); |
|
|
|
|
|
|
|
|
|
return array_merge($this->getBuildInOperators(), $this->registeredOperators); |
|
|
|
|
} |
|
|
|
@ -714,7 +705,6 @@ class Manager implements IManager { |
|
|
|
|
*/ |
|
|
|
|
public function getCheckList(): array { |
|
|
|
|
$this->dispatcher->dispatchTyped(new RegisterChecksEvent($this)); |
|
|
|
|
$this->legacyEventDispatcher->dispatch(IManager::EVENT_NAME_REG_CHECK, new GenericEvent($this)); |
|
|
|
|
|
|
|
|
|
return array_merge($this->getBuildInChecks(), $this->registeredChecks); |
|
|
|
|
} |
|
|
|
|