Schütze den vorherigen Programmstand vor Kompositionen unbekannter Art
Eine Komposition mit einem kind-Wert, den erst ein neuerer Stand schreibt, gilt als nicht vorhanden (globaler Bereichsfilter statt Absturz im Enum-Cast). Aufbauten mit solchen Bestandteilen werden hier weder veröffentlicht noch als Angebot aktiviert, der Editor bleibt schreibgeschützt, die Mitgliederansicht zeigt den Bestandteil nicht. Grundlage für die Übungsverwaltung, damit ein Rückfall nichts verliert oder offenlegt. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
da02e0bbda
commit
ef56befc0e
16 files changed
+513
-5
No files matched your search
@@ -266,7 +266,7 @@ public function elementUsage(ContentElement $element): array
|
||||
->get();
|
||||
|
||||
foreach ($members as $member) {
|
||||
$lines[] = self::compositionLabel($member->compositionVersion->composition)
|
||||
$lines[] = self::compositionLabelOf($member->compositionVersion->composition)
|
||||
.' · Fassung '.$member->compositionVersion->number
|
||||
.' · Rolle '.$member->role;
|
||||
}
|
||||
@@ -313,7 +313,7 @@ public function compositionMembers(Composition $composition): array
|
||||
}
|
||||
|
||||
$nested = $member->nestedCompositionVersion;
|
||||
$lines[] = $member->role.' — '.($nested === null ? 'fehlt' : self::compositionLabel($nested->composition));
|
||||
$lines[] = $member->role.' — '.($nested === null ? 'fehlt' : self::compositionLabelOf($nested->composition));
|
||||
}
|
||||
|
||||
return $lines;
|
||||
@@ -365,7 +365,7 @@ public function compositionUsage(Composition $composition): array
|
||||
->get();
|
||||
|
||||
foreach ($parents as $member) {
|
||||
$lines[] = self::compositionLabel($member->compositionVersion->composition)
|
||||
$lines[] = self::compositionLabelOf($member->compositionVersion->composition)
|
||||
.' · Fassung '.$member->compositionVersion->number
|
||||
.' · Rolle '.$member->role;
|
||||
}
|
||||
@@ -448,6 +448,16 @@ private function purpose(string $purpose): string
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Eine Zusammenstellung, die dieser Programmstand nicht kennt, erscheint nur als Hinweis ohne Namen und Inhalt.
|
||||
*/
|
||||
private static function compositionLabelOf(?Composition $composition): string
|
||||
{
|
||||
return $composition === null
|
||||
? 'Zusammenstellung einer neueren Programmversion'
|
||||
: self::compositionLabel($composition);
|
||||
}
|
||||
|
||||
private static function compositionLabel(Composition $composition): string
|
||||
{
|
||||
$kind = $composition->kind;
|
||||
|
||||
Reference in new issue
Block a user