imI'm stuck with following error message on a project with symfony 2.8 and sonata admin/media bundle. iI log in sonata and navigate to the list view were iI have an edit button. iI click the edit button and get following error.
error message:
The form's view data is expected to be of type scalar, array or an instance of \ArrayAccess\ArrayAccess
, but is an instance of class DateTime. You can avoid this error by setting the "data_class" option to "DateTime" or by adding a view transformer that transforms an instance of class DateTime to scalar, array or an instance of \ArrayAccess\ArrayAccess
.
iI found some answers via stackoverflow saying that the data_class needs to be set on the specific formtype. butBut thats sonata, were can iI find the form iI have to work on?