. */ declare(strict_types=1); namespace App\Entity\Parts; enum ManufacturingStatus: string { /** Part has been announced, but is not in production yet */ case ANNOUNCED = 'announced'; /** Part is in production and will be for the foreseeable future */ case ACTIVE = 'active'; /** Not recommended for new designs. */ case NRFND = 'nrfnd'; /** End of life: Part will become discontinued soon */ case EOL = 'eol'; /** Part is obsolete/discontinued by the manufacturer. */ case DISCONTINUED = 'discontinued'; /** Status not set */ case NOT_SET = ''; public function toTranslationKey(): string { return match ($this) { self::ANNOUNCED => 'm_status.announced', self::ACTIVE => 'm_status.active', self::NRFND => 'm_status.nrfnd', self::EOL => 'm_status.eol', self::DISCONTINUED => 'm_status.discontinued', self::NOT_SET => '', }; } }