This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

How can I use Enum on Entity property type and using values

Discuss installing Symfony 2 here

How can I use Enum on Entity property type and using values

by flim » Tue Sep 24, 2013 1:42 pm

Hi,

How can I use enum on symfony2 ?

I would like to set a type of an entity property to enum like : "Red", "Blue", "Green".
Then I want to use the same enum values to create a listbox.

At the moment I use the mysql enum on doctrine2. But I can't find a way to get the values on my controller.

There is a way to create an enum in a yaml file and use it for that ?

Thanks
flim
Junior Member
 
Posts: 1
Joined: Tue Sep 24, 2013 1:35 pm