// Expand elements that map to a form (like "children[address]")
for ($it->
rewind();
$it->
valid() &&
$it->
mapsForm();
$it->
next()) { if (!
$scope->
has($it->
current())) { // Scope relates to a form that does not exist
// Bail out
break;
} // Process child form
$scope =
$scope->
get($it->
current());
if ($scope->
getConfig()->
getInheritData()) { // Form inherits its parent data
// Cut the piece out of the property path and proceed
$propertyPathBuilder->
remove($i);
} else { /* @var \Symfony\Component\PropertyAccess\PropertyPathInterface $propertyPath */
$propertyPath =
$scope->
getPropertyPath();
if (null ===
$propertyPath) { // Property path of a mapped form is null
// Should not happen, bail out
break;
}