diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2019-08-27 17:51:10 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2019-09-09 22:56:03 +0200 |
commit | 827dd896fa903bb86f3434034952bb0e435a230c (patch) | |
tree | 2f5a76d1fcf5839f17264e1e92f80fe73ff6ea6f /apps/workflowengine/lib/Controller | |
parent | fe2a78609ab2b69e5540657ffea50d3c1f859001 (diff) | |
download | nextcloud-server-827dd896fa903bb86f3434034952bb0e435a230c.tar.gz nextcloud-server-827dd896fa903bb86f3434034952bb0e435a230c.zip |
extend DB table, manager, controller with support for entity events
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/workflowengine/lib/Controller')
-rw-r--r-- | apps/workflowengine/lib/Controller/AWorkflowController.php | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/apps/workflowengine/lib/Controller/AWorkflowController.php b/apps/workflowengine/lib/Controller/AWorkflowController.php index 2e54e417a34..24f57321834 100644 --- a/apps/workflowengine/lib/Controller/AWorkflowController.php +++ b/apps/workflowengine/lib/Controller/AWorkflowController.php @@ -94,10 +94,16 @@ abstract class AWorkflowController extends OCSController { * @throws OCSForbiddenException * @throws OCSException */ - public function create(string $class, string $name, array $checks, string $operation): DataResponse { + public function create( + string $class, + string $name, + array $checks, + string $operation, + array $events + ): DataResponse { $context = $this->getScopeContext(); try { - $operation = $this->manager->addOperation($class, $name, $checks, $operation, $context); + $operation = $this->manager->addOperation($class, $name, $checks, $operation, $context, $events); $operation = $this->manager->formatOperation($operation); return new DataResponse($operation); } catch (\UnexpectedValueException $e) { @@ -114,9 +120,15 @@ abstract class AWorkflowController extends OCSController { * @throws OCSForbiddenException * @throws OCSException */ - public function update(int $id, string $name, array $checks, string $operation): DataResponse { + public function update( + int $id, + string $name, + array $checks, + string $operation, + array $events + ): DataResponse { try { - $operation = $this->manager->updateOperation($id, $name, $checks, $operation, $this->getScopeContext()); + $operation = $this->manager->updateOperation($id, $name, $checks, $operation, $this->getScopeContext(), $events); $operation = $this->manager->formatOperation($operation); return new DataResponse($operation); } catch (\UnexpectedValueException $e) { |