Halte Auswirkung und Rückzug beim Veröffentlichen eines Artikel-Stands fest.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
fd6860efda
commit
fef0ea2ac2
11 files changed
+298
-25
No files matched your search
@@ -19,6 +19,20 @@ public function createElement(string $kind, string $outputClass, string $working
|
||||
]);
|
||||
}
|
||||
|
||||
public function block(ContentElementVersion|CompositionVersion $version, string $reason): void
|
||||
{
|
||||
if (trim($reason) === '') {
|
||||
throw new DomainRuleException('Eine Sperre braucht eine Begründung.');
|
||||
}
|
||||
|
||||
if ($version->status !== ContentVersionStatus::Bereit) {
|
||||
throw new DomainRuleException('Nur eine bereitgestellte Fassung kann gesperrt werden.');
|
||||
}
|
||||
|
||||
$version->status = ContentVersionStatus::Gesperrt;
|
||||
$version->save();
|
||||
}
|
||||
|
||||
public function publishElementVersion(
|
||||
ContentElement $element,
|
||||
?string $body = null,
|
||||
|
||||
Reference in new issue
Block a user