/**
* Helper function to create a generic ConfigLayout entity.
*/
private function createContainer( ContainerInterface
$container,
Template
$template,
?Layout
$parent = null
): Layout
{ $entity =
$this->
checkExistingLayout( $template->
getLayouts(),
$container->
getName() );
$entity->
setTemplate($template);
$entity->
setParent($parent);
$entity->
setName($container->
getName());
$entity->
setAttributes($container->
getAttributes());
return $entity;
}