chore: complete update

This commit is contained in:
2025-07-17 16:24:20 +02:00
parent 899227b0a4
commit 64a7051137
1300 changed files with 85570 additions and 2756 deletions

View File

@@ -0,0 +1,40 @@
<?php
namespace App\Domain\Media;
enum ImageSize: string
{
case SMALL = 'small';
case MEDIUM = 'medium';
case LARGE = 'large';
case XLARGE = 'xlarge';
public function getWidth(ImageVariantType $type): int
{
return match ([$type, $this]) {
[ImageVariantType::THUMBNAIL, self::SMALL] => 150,
[ImageVariantType::THUMBNAIL, self::MEDIUM] => 300,
[ImageVariantType::GALLERY, self::SMALL] => 400,
[ImageVariantType::GALLERY, self::MEDIUM] => 800,
[ImageVariantType::GALLERY, self::LARGE] => 1200,
[ImageVariantType::HERO, self::SMALL] => 768,
[ImageVariantType::HERO, self::MEDIUM] => 1024,
[ImageVariantType::HERO, self::LARGE] => 1920,
[ImageVariantType::HERO, self::XLARGE] => 2560,
default => throw new \InvalidArgumentException("Invalid combination: {$type->value} - {$this->value}"),
};
}
public function getBreakpoint(): ?int
{
return match ($this) {
self::SMALL => 768,
self::MEDIUM => 1024,
self::LARGE => 1920,
self::XLARGE => null, // Keine Breakpoint-Beschränkung
};
}
}