$normData =
$this->
viewToNorm($viewData);
// Hook to change content of the data in the normalized
// representation
if ($dispatcher->
hasListeners(FormEvents::SUBMIT
)) { $event =
new SubmitEvent($this,
$normData);
$dispatcher->
dispatch($event, FormEvents::SUBMIT
);
$normData =
$event->
getData();
} // Synchronize representations - must not change the content!
$modelData =
$this->
normToModel($normData);
$viewData =
$this->
normToView($normData);
} } catch (TransformationFailedException
$e) { $this->transformationFailure =
$e;
// If $viewData was not yet set, set it to $submittedData so that
// the erroneous data is accessible on the form.
// Forms that inherit data never set any data, because the getters
// forward to the parent form's getters anyway.
if (null ===
$viewData && !
$this->inheritData
) { $viewData =
$submittedData;
}