use Symfony\Component\PropertyAccess\PropertyAccess;
use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
use Symfony\Contracts\Translation\TranslatableInterface;
class FormType extends BaseType
{ private DataMapper
$dataMapper;
public function __construct(PropertyAccessorInterface
$propertyAccessor = null
) { $this->dataMapper =
new DataMapper(new ChainAccessor([ new CallbackAccessor(),
new PropertyPathAccessor($propertyAccessor ?? PropertyAccess::
createPropertyAccessor()),
]));
} /**
* @return void
*/
public function buildForm(FormBuilderInterface
$builder, array
$options) { parent::
buildForm($builder,
$options);