FormInterface::setData()

FormInterface setData(mixed $modelData)

Updates the form with default data.

Parameters

mixed $modelData The data formatted as expected for the underlying object

Return Value

FormInterface The form instance

Exceptions

AlreadySubmittedException If the form has already been submitted.
LogicException If listeners try to call setData in a cycle. Or if the view data does not match the expected type according to {@link FormConfigInterface::getDataClass}.
doc_Symfony
2016-10-28 06:19:02
Comments
Leave a Comment

Please login to continue.