Submit-Modal auf zwei Auswahloptionen reduziert (kein Label vs.
"Ganz oder ueberwiegend mit generativer KI erstellt"); alle vier
Enum-Werte bleiben fuer API/Bestand gueltig und mappen per formOption()
auf die zwei Gruppen. Oeffentliche Detailseite rendert jetzt Text-Label
("KI-generiert: Nach Angaben ...") und Bild-Badge (KI-generiert/
KI-bearbeitet, abgedunkelter Hintergrund) — fehlte dort bisher komplett.
Bildnachweis-Vorschlag ohne "Foto:"-Praefix (stand sonst doppelt).
Einreich-Toast + FAQ: automatische Pruefung in Minuten statt 24 h.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
67 lines
1.7 KiB
PHP
67 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace App\Enums;
|
|
|
|
/**
|
|
* Selbst-Deklaration des KI-Einsatzes je PM-Bild (Art. 50 Abs. 4 KI-VO).
|
|
*
|
|
* Pflichtauswahl beim Bild-Upload (Decision-Update KI-Kennzeichnung,
|
|
* 08.07.2026). Bewusste Über-Erfüllung: gelabelt wird jedes deklarierte
|
|
* KI-Bild — auch stilisiert/abstrakt, nicht nur fotorealistische Deepfakes.
|
|
*/
|
|
enum AiImageDeclaration: string
|
|
{
|
|
case Original = 'original';
|
|
case AiGenerated = 'ai_generated';
|
|
case AiEdited = 'ai_edited';
|
|
|
|
/**
|
|
* Wortlaut der Auswahloption im Upload-Formular.
|
|
*/
|
|
public function label(): string
|
|
{
|
|
return match ($this) {
|
|
self::Original => __('Originalfoto'),
|
|
self::AiGenerated => __('KI-generiertes Bild'),
|
|
self::AiEdited => __('KI-bearbeitetes Bild'),
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Öffentlicher Bildhinweis direkt am Bild (Badge) — null bei Originalfotos
|
|
* (keine Nicht-KI-Zertifizierung in Portalstimme). Kurzform „KI-generiert"
|
|
* statt Satz-Wortlaut (User-Entscheidung 10.07.2026).
|
|
*/
|
|
public function publicLabel(): ?string
|
|
{
|
|
return match ($this) {
|
|
self::Original => null,
|
|
self::AiGenerated => __('KI-generiert'),
|
|
self::AiEdited => __('KI-bearbeitet'),
|
|
};
|
|
}
|
|
|
|
/**
|
|
* Optionsliste für Radios/Selects: value => label.
|
|
*
|
|
* @return array<string, string>
|
|
*/
|
|
public static function options(): array
|
|
{
|
|
$options = [];
|
|
|
|
foreach (self::cases() as $case) {
|
|
$options[$case->value] = $case->label();
|
|
}
|
|
|
|
return $options;
|
|
}
|
|
|
|
/**
|
|
* @return list<string>
|
|
*/
|
|
public static function values(): array
|
|
{
|
|
return array_column(self::cases(), 'value');
|
|
}
|
|
}
|