this is my first question, so sorry if I miss some information.
In my project I try to create a FormType with a ChoiceType. The ChoiceType should contain the weekdays (eg. monday, tuesday, etc).
Now I was wondering how I should deal with this exactly? First things which came in my mind are: - create a new weekday entity and store the weekdays in the database - put the weekdays in the choices as static array - somehow define a global array with the weekdays
I do not really like any solution though. So i was wondering if there is a general PHP way to get all weekday names for my ChoiceType. Also I'd like to reuse the same array multiple times (thats why I dont want to use a static array). The database solution could work, but that means I would have to define each weekday in every instance of my project - which also seems not ideal.
Thanks for any help