I have a simple form with Sonata admin.
I would like the user could add a list of integers (as many as he wants). And after it would be store as an array in my object:
[1, 2, 3, 6, 9]
There any way of doing it without creating another class to instantiate the integers?
UPDATE:
The only way I know how to something close is using choice like:
->add('type', 'choice', [
"required" => true,
"expanded" => true,
"multiple" => false,
"choices" => Campanha::getTypes(),
])
But with that I have a limited number of choices, I would like that it would be free to the user to add the quantity of numbers and the values he wants