Zeige Katalogkarten, Titelbilder und klare Freigabestatus im Arbeitsplatz.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
053a361801
commit
9195cdcd15
15 files changed
+795
-59
No files matched your search
@@ -16,6 +16,7 @@ public function __construct(
|
||||
public readonly string $subject,
|
||||
public readonly int $subjectId,
|
||||
public readonly ?string $incoming = null,
|
||||
public readonly ?int $fromElement = null,
|
||||
) {}
|
||||
|
||||
public function handle(ThumbnailDeriver $deriver): void
|
||||
@@ -23,7 +24,21 @@ public function handle(ThumbnailDeriver $deriver): void
|
||||
if ($this->subject === 'komposition') {
|
||||
$composition = Composition::query()->find($this->subjectId);
|
||||
|
||||
if ($composition !== null && is_string($this->incoming)) {
|
||||
if ($composition === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($this->fromElement !== null) {
|
||||
$element = ContentElement::query()->find($this->fromElement);
|
||||
|
||||
if ($element !== null) {
|
||||
$deriver->forCompositionFromElement($composition, $element);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_string($this->incoming)) {
|
||||
$deriver->forCompositionUpload($composition, $this->incoming);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user