{
"event": "PostToolUse",
"tool_name": "Grep",
"tool_response": {
"mode": "content",
"numFiles": 0,
"filenames": [],
"content": "78- * POST \/semantic-explorer\/ontologie\n79- *\/\n80: public function store(): void\n81- {\n82- $input = $this->getJsonInput();\n83-\n84- $name = trim($input['name'] ?? '');\n85- $parentId = isset($input['parent_class_id']) && $input['parent_class_id'] !== '' ? (int) $input['parent_class_id'] : null;\n86- $description = trim($input['description'] ?? '') ?: null;\n87- $properties = $input['properties'] ?? [];\n88-\n89- if ($name === '') {\n90- $this->json($this->apiFormatter->validationError('Name ist erforderlich', ['name' => 'Pflichtfeld']), 400);\n91-\n92- return;\n93- }\n94-\n95- try {\n96- $id = $this->repository->create($name, $parentId, $description, $properties);\n97-\n98- \/\/ Audit log\n99- $this->audit->logCreate(\n100- table: 'ontology_classes',\n101- id: $id,\n102- data: ['name' => $name, 'parent_class_id' => $parentId, 'description' => $description],\n103- actor: 'user',\n104- actorType: 'user'\n105- );\n--\n132- * POST \/semantic-explorer\/ontologie\/{id}\n133- *\/\n134: public function update(int $id): void\n135- {\n136- $input = $this->getJsonInput();\n137-\n138- $name = trim($input['name'] ?? '');\n139- $parentId = isset($input['parent_class_id']) && $input['parent_class_id'] !== '' ? (int) $input['parent_class_id'] : null;\n140- $description = trim($input['description'] ?? '') ?: null;\n141- $properties = $input['properties'] ?? [];\n142-\n143- if ($name === '') {\n144- $this->json($this->apiFormatter->validationError('Name ist erforderlich', ['name' => 'Pflichtfeld']), 400);\n145-\n146- return;\n147- }\n148-\n149- try {\n150- \/\/ Get old state for audit\n151- $oldClass = $this->repository->find($id);\n152-\n153- $this->repository->update($id, $name, $parentId, $description, $properties);\n154-\n155- \/\/ Audit log\n156- $this->audit->logUpdate(\n157- table: 'ontology_classes',\n158- id: $id,\n159- oldData: $oldClass !== null ? ['name' => $oldClass['name'], 'description' => $oldClass['description'] ?? null] : [],",
"numLines": 57
}
}