public function deleteUserGroup(APIUserGroup $userGroup)
{
$loadedUserGroup = $this->loadUserGroup($userGroup->id);
$this->repository->beginTransaction();
try {
//@todo: what happens to sub user groups and users below sub user groups
$affectedLocationIds = $this->repository->getContentService()->deleteContent($loadedUserGroup->getVersionInfo()->getContentInfo());
$this->repository->commit();
} catch (Exception $e) {
$this->repository->rollback();
throw $e;
}
return $affectedLocationIds;
}