$hash =
spl_object_hash($form);
if (!
isset($this->dataByForm
[$hash])) { // field was created by form event
$this->
collectConfiguration($form);
$this->
collectDefaultData($form);
} $this->dataByForm
[$hash] =
array_replace( $this->dataByForm
[$hash],
$this->dataExtractor->
extractSubmittedData($form) );
// Count errors
if (isset($this->dataByForm
[$hash]['errors'
])) { $this->data
['nb_errors'
] += \
count($this->dataByForm
[$hash]['errors'
]);
} foreach ($form as $child) { $this->
collectSubmittedData($child);
// Expand current form if there are children with errors