{
"event": "PreToolUse",
"tool_name": "Read",
"tool_input": {
"file_path": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/Persistence\/ContentConfigRepository.php",
"limit": 50
}
}
{
"tool_response": {
"type": "text",
"file": {
"filePath": "\/var\/www\/dev.campus.systemische-tools.de\/src\/Infrastructure\/Persistence\/ContentConfigRepository.php",
"content": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Infrastructure\\Persistence;\n\n\/\/ @responsibility: Persistenz für Content-Konfiguration (Profile, Contracts, Strukturen)\n\nclass ContentConfigRepository\n{\n private \\PDO $pdo;\n\n public function __construct(\\PDO $pdo)\n {\n $this->pdo = $pdo;\n }\n\n public function findById(int $id): ?array\n {\n $stmt = $this->pdo->prepare(\n 'SELECT c.*, p.name as parent_name\n FROM content_config c\n LEFT JOIN content_config p ON c.parent_id = p.id\n WHERE c.id = ?'\n );\n $stmt->execute([$id]);\n $result = $stmt->fetch(\\PDO::FETCH_ASSOC);\n\n return $result !== false ? $result : null;\n }\n\n public function findByIdAndType(int $id, string $type): ?array\n {\n $stmt = $this->pdo->prepare(\n \"SELECT id, name, slug, content, type, status\n FROM content_config\n WHERE id = ? AND type = ? AND status = 'active'\"\n );\n $stmt->execute([$id, $type]);\n $result = $stmt->fetch(\\PDO::FETCH_ASSOC);\n\n return $result !== false ? $result : null;\n }\n\n public function findAll(?string $typeFilter = null, ?string $statusFilter = null): array\n {\n $sql = 'SELECT c.*, p.name as parent_name\n FROM content_config c\n LEFT JOIN content_config p ON c.parent_id = p.id\n WHERE 1=1';",
"numLines": 50,
"startLine": 1,
"totalLines": 234
}
}
}