workflowRepo = new WorkflowRepository(); } // Zeigt alle Workflows des Benutzers an public function getWorkflows() { $user_id = \OC::$server->getUserManager()->getUser()->getUID(); $workflows = $this->workflowRepo->getWorkflowsForUser($user_id); return $this->render('main.php', ['workflows' => $workflows]); } // Workflow erstellen public function createWorkflow($deck_id, $source_stack_id, $target_stack_id) { $user_id = \OC::$server->getUserManager()->getUser()->getUID(); $this->workflowRepo->createWorkflow($user_id, $deck_id, $source_stack_id, $target_stack_id); return $this->getWorkflows(); } // Workflow löschen public function deleteWorkflow($workflow_id) { $this->workflowRepo->deleteWorkflow($workflow_id); return $this->getWorkflows(); } }