Backup #699
| ID | 699 |
| Dateipfad | /var/www/dev.campus.systemische-tools.de/src/Controller/ProtokollController.php |
| Version | 15 |
| Typ |
modified |
| Größe | 2.1 KB |
| Hash | 170eb7677f842179fd3e5d56a434529724befed8024c686550d4b7482bd7634f |
| Datum | 2025-12-23 07:53:34 |
| Geändert von | claude-code-hook |
| Grund | Claude Code Pre-Hook Backup vor Edit-Operation |
| Datei existiert |
Ja
|
Dateiinhalt
<?php
namespace Controller;
use Framework\Controller;
use UseCases\Protokoll\ViewProtokollUseCase;
class ProtokollController extends Controller
{
private ViewProtokollUseCase $protokollUseCase;
public function __construct(ViewProtokollUseCase $protokollUseCase)
{
$this->protokollUseCase = $protokollUseCase;
}
public function index(): void
{
$pagination = $this->getPagination(50);
$search = $this->getString('search');
$status = $this->getString('status');
$model = $this->getString('model');
$searchVal = $search !== '' ? $search : null;
$statusVal = $status !== '' ? $status : null;
$modelVal = $model !== '' ? $model : null;
$result = $this->protokollUseCase->getPaginated($searchVal, $statusVal, $modelVal, $pagination);
$updatedPagination = $result['pagination'];
$this->view('protokoll.index', [
'title' => 'KI-Protokoll',
'stats' => $this->protokollUseCase->getStatistics(),
'entries' => array_map(fn ($dto) => $dto->toArray(), $result['entries']),
'models' => $this->protokollUseCase->getDistinctModels(),
'currentSearch' => $search,
'currentStatus' => $status,
'currentModel' => $model,
'currentPage' => $updatedPagination->page,
'totalCount' => $updatedPagination->totalCount,
'totalPages' => $updatedPagination->totalPages(),
]);
}
public function show(string $id): void
{
$entry = $this->protokollUseCase->getById((int) $id);
if ($entry === null) {
$this->notFound('Protokoll-Eintrag nicht gefunden');
}
$nav = $this->protokollUseCase->getNavigation((int) $id);
$this->view('protokoll.show', [
'title' => 'Protokoll #' . $id,
'entry' => $entry->toArray(),
'prevEntry' => $nav['prevId'] !== null ? ['id' => $nav['prevId']] : false,
'nextEntry' => $nav['nextId'] !== null ? ['id' => $nav['nextId']] : false,
]);
}
}
Vollständig herunterladen
Aktionen
Andere Versionen dieser Datei
| ID |
Version |
Typ |
Größe |
Datum |
| 699 |
15 |
modified |
2.1 KB |
2025-12-23 07:53 |
| 643 |
14 |
modified |
2.1 KB |
2025-12-23 04:47 |
| 469 |
13 |
modified |
2.1 KB |
2025-12-22 10:32 |
| 468 |
12 |
modified |
2.1 KB |
2025-12-22 10:32 |
| 453 |
11 |
modified |
2.9 KB |
2025-12-22 10:27 |
| 448 |
10 |
modified |
5.3 KB |
2025-12-22 10:19 |
| 407 |
9 |
modified |
5.2 KB |
2025-12-22 08:55 |
| 345 |
8 |
modified |
5.1 KB |
2025-12-22 08:12 |
| 344 |
7 |
modified |
5.1 KB |
2025-12-22 08:12 |
| 343 |
6 |
modified |
5.1 KB |
2025-12-22 08:12 |
| 306 |
5 |
modified |
5.1 KB |
2025-12-22 08:05 |
| 246 |
4 |
modified |
5.2 KB |
2025-12-22 01:46 |
| 135 |
3 |
modified |
4.9 KB |
2025-12-20 19:56 |
| 34 |
2 |
modified |
5.7 KB |
2025-12-20 17:23 |
| 3 |
1 |
modified |
5.7 KB |
2025-12-20 16:08 |
← Zurück zur Übersicht