public function deleteObjectStateGroup(APIObjectStateGroup $objectStateGroup)
{
if ($this->repository->hasAccess('state', 'administrate') !== true) {
throw new UnauthorizedException('state', 'administrate');
}
$loadedObjectStateGroup = $this->loadObjectStateGroup($objectStateGroup->id);
$this->repository->beginTransaction();
try {
$this->objectStateHandler->deleteGroup($loadedObjectStateGroup->id);
$this->repository->commit();
} catch (Exception $e) {
$this->repository->rollback();
throw $e;
}
}