'about', self::NOTICE => 'notice', self::COMING_SOON => 'coming_soon', self::CERTIFICATE_INFO => 'certificate_info', self::ACCESS_DEVICES => 'access_devices', self::SUBTITLE => 'subtitle', }; } public static function from_field( string $field ): ?self { foreach ( self::cases() as $case ) { if ( $case->field() === $field ) { return $case; } } return null; } }