'hero-1', 'type' => 'hero', 'data' => ['title' => 'Hero Title'], ], ]); } public static function createHeroBlock( ?BlockId $blockId = null, ?string $title = null ): ContentBlock { return ContentBlock::create( type: BlockType::hero(), blockId: $blockId ?? BlockId::fromString('hero-1'), data: BlockData::fromArray(['title' => $title ?? 'Hero Title']) ); } public static function createTextBlock( ?BlockId $blockId = null, ?string $content = null ): ContentBlock { return ContentBlock::create( type: BlockType::text(), blockId: $blockId ?? BlockId::fromString('text-1'), data: BlockData::fromArray(['content' => $content ?? 'Text content']) ); } public static function createImageBlock( ?BlockId $blockId = null, ?string $imageId = null ): ContentBlock { return ContentBlock::create( type: BlockType::image(), blockId: $blockId ?? BlockId::fromString('image-1'), data: BlockData::fromArray(['imageId' => $imageId ?? 'img-123']) ); } public static function createContentTranslation( ContentId $contentId, ?Locale $locale = null, ?string $title = null, ?ContentBlocks $blocks = null ): \App\Domain\Cms\Entities\ContentTranslation { return new \App\Domain\Cms\Entities\ContentTranslation( contentId: $contentId, locale: $locale ?? Locale::german(), title: $title ?? 'Deutscher Titel', blocks: $blocks ?? self::createSimpleBlocks(), createdAt: Timestamp::now(), updatedAt: Timestamp::now() ); } }