ContentVersionStatus::class, 'metadata' => 'array', ]; } protected static function booted(): void { static::updating(function (ContentElementVersion $version): void { if (in_array(StatusValue::of($version->getOriginal('status')), [ ContentVersionStatus::Bereit->value, ContentVersionStatus::Gesperrt->value, ], true)) { throw new DomainRuleException('Eine bereitgestellte Inhaltsfassung ist unveränderlich.'); } }); } public function element(): BelongsTo { return $this->belongsTo(ContentElement::class, 'content_element_id'); } }