form

Symfony form pills – form type options

Today we are going to tackle a problem that I’ve recently faced with Symfony form types. Scenario: I need a choice type of a certain entity (Foo) with values that follows a certain logic

I’ve built up a FooChoiceType because I don’t want to inject fooAdapter in each form where I’m…

Symfony form pills – Value object

Suppose that we have a value object or, more in general, an object where its data has been set in the constructor

and its FormType

Let’s assume that bar and foobar are taken from HTTP POST values (so, basically, we need those values to be posted in order to instantiate a Foo object). Question How can I create…