Answers.Body: <p>The upcoming Craft 2.2 release added a getConstants() method to the <a href="http://buildwithcraft.com/classreference/enums/BaseEnum" rel="nofollow">BaseEnum</a> class so you'd be able to do:</p>
  
  <pre><code>EnumClass::getConstants()
  </code></pre>
  
  <p>to get an array of all of the options in an enum.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-08-29T17:44:16.983Z
Answers.Text: Any info when it'll be available ?
Answers.UserDisplayName: maxx
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-08-29T18:17:56.633Z
Answers.Text: Very soon now...
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-08-29T17:30:59.130Z
Answers.LastActivityDate: 2014-08-29T17:30:59.130Z
Answers.UserDisplayName: Brad Bell
Body: <p>So I have a model with an Enum and I want a selectField for that Enum. Is there a DRY way to do that ? And if yes does it work with the translation-filter ?</p>
  
Tags: <templating><plugin-development><models>
Title: From AttributeType::Enum in Model to a matching selectField?
ThreadText: # From AttributeType::Enum in Model to a matching selectField?
  
  (Asked by: username_0 on 2014-08-29)
  
  So I have a model with an Enum and I want a selectField for that Enum. Is there a DRY way to do that ? And if yes does it work with the translation-filter ?
  
  **Tags:** templating, plugin-development, models
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-08-29. Score: 1 | Accepted answer
  
  The upcoming Craft 2.2 release added a getConstants() method to the [BaseEnum](http://buildwithcraft.com/classreference/enums/BaseEnum) class so you'd be able to do:
  
  ```
  EnumClass::getConstants()
  
  ```
  
  to get an array of all of the options in an enum.
  
  > **Comments:**
  > **username_0**: Any info when it'll be available ?  
  > **username_1**: Very soon now...  
  
  ---
  
  