. */ namespace App\Entity\LabelSystem; use App\Entity\Parts\Part; use App\Entity\Parts\PartLot; use App\Entity\Parts\Storelocation; enum LabelSupportedElement: string { case PART = 'part'; case PART_LOT = 'part_lot'; case STORELOCATION = 'storelocation'; /** * Returns the entity class for the given element type * @return string */ public function getEntityClass(): string { return match ($this) { self::PART => Part::class, self::PART_LOT => PartLot::class, self::STORELOCATION => Storelocation::class, }; } }