$entity =
$this->
createContainer($container,
$template,
$parent);
// Do class switch to route the container to the responsible save function.
switch ($class) { case TabContainer::
class:
$entity =
$this->
saveTabContainer($entity);
break;
case Tab::
class:
if ($container instanceof Tab
) { $entity =
$this->
saveTab($entity,
$container);
} break;
case FieldSet::
class:
if ($container instanceof FieldSet
) { $entity =
$this->
saveFieldSet($entity,
$container);
} break;
} // Check for recursion