if ($container instanceof FieldSet
) { $entity =
$this->
saveFieldSet($entity,
$container);
} break;
} // Check for recursion
foreach ($container->
getElements() as $element) { if ($element instanceof ContainerInterface
) { $this->
saveContainer($element,
$template,
$entity);
} elseif ($element instanceof Field
) { $this->
saveField($element,
$template,
$entity);
} } } /**
* Helper function to create a generic ConfigLayout entity.
*/
private function createContainer( ContainerInterface
$container,
Template
$template,
?Layout
$parent = null
):