SyntaxFix
Write A Post
Hire A Developer
Questions
You can use the Enum::valueOf() function as suggested by Gareth Davis & Brad Mace above, but make sure you handle the IllegalArgumentException that would be thrown if the string used is not present in the enum.
Enum::valueOf()
IllegalArgumentException