Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 1.08 KB

additional_methods.md

File metadata and controls

34 lines (24 loc) · 1.08 KB

Additional methods

AbstractEnumType provides few additional methods, which might be useful.

If you need to check if some string value exists in the array of ENUM values:
BasketballPositionType::isValueExist('Pitcher');
// Will return: false
If you need to get value in the readable format:
BasketballPositionType::getReadableValue(BasketballPositionType::SHOOTING_GUARD);
// Will return: Shooting Guard
If you need to get values in the readable format:
BasketballPositionType::getValues();
// Will return: ['PG', 'SG', 'SF', 'PF', 'C']

More features