{
"event": "PreToolUse",
"tool_name": "Read",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Controller\/ContentController.php",
"offset": 56,
"limit": 40
}
}
{
"tool_response": {
"type": "text",
"file": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Controller\/ContentController.php",
"content": " \/**\n * POST \/content\n * Store new order\n *\/\n public function store(): void\n {\n $this->requireCsrf();\n\n $title = trim($_POST['title'] ?? '');\n $briefing = trim($_POST['briefing'] ?? '');\n\n if ($title === '' || $briefing === '') {\n $_SESSION['error'] = 'Titel und Briefing sind erforderlich.';\n header('Location: \/content\/new');\n exit;\n }\n\n \/\/ Auto-apply first active contract if none selected\n $contractId = $_POST['contract_id'] ?? null;\n if ($contractId === null || $contractId === '') {\n $contracts = $this->repository->findAllContracts();\n if ($contracts !== []) {\n $contractId = $contracts[0]['id'];\n }\n }\n\n $orderId = $this->repository->createOrder([\n 'title' => $title,\n 'briefing' => $briefing,\n 'author_profile_id' => $_POST['author_profile_id'] ?? null,\n 'contract_id' => $contractId,\n 'structure_id' => $_POST['structure_id'] ?? null,\n ]);\n\n header('Location: \/content\/' . $orderId);\n exit;\n }\n\n \/**\n * GET \/content\/{id}",
"numLines": 40,
"startLine": 56,
"totalLines": 388
}
}
}