/**
* Listener for the {@link FormEvents::POST_SUBMIT} event.
*
* @return void
*/
public function postSubmit(FormEvent
$event) { if ($event->
getForm()->
isRoot()) { // Collect the submitted data of each form
$this->dataCollector->
collectSubmittedData($event->
getForm());
// Assemble a form tree
// This is done again after the view is built, but we need it here as the view is not always created.
$this->dataCollector->
buildPreliminaryFormTree($event->
getForm());
} }}