public function deleteRoleDraft(APIRoleDraft $roleDraft)
    {
        $loadedRoleDraft = $this->loadRoleDraft($roleDraft->id);

        $this->repository->beginTransaction();
        try {
            $this->userHandler->deleteRole($loadedRoleDraft->id, Role::STATUS_DRAFT);
            $this->repository->commit();
        } catch (Exception $e) {
            $this->repository->rollback();
            throw $e;
        }
    }
public function deleteRoleDraft(APIRoleDraft $roleDraft)
    {
        $loadedRoleDraft = $this->loadRoleDraft($roleDraft->id);

        $this->repository->beginTransaction();
        try {
            $this->userHandler->deleteRole($loadedRoleDraft->id, Role::STATUS_DRAFT);
            $this->repository->commit();
        } catch (Exception $e) {
            $this->repository->rollback();
            throw $e;
        }
    }
public function deleteRoleDraft ( APIRoleDraft $ roleDraft ) { $ loadedRoleDraft = $ this -> loadRoleDraft ( $ roleDraft -> id ) ; $ this -> repository -> beginTransaction ( ) ; try { $ this -> userHandler -> deleteRole ( $ loadedRoleDraft -> id , Role :: STATUS_DRAFT ) ; $ this -> repository -> commit ( ) ; } catch ( Exception $ e ) { $ this -> repository -> rollback ( ) ; throw $ e ; } }
Deletes the given RoleDraft.

@since 6.0

@throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the authenticated user is not allowed to delete this RoleDraft

@param \eZ\Publish\API\Repository\Values\User\RoleDraft $roleDraft
Deletes the given RoleDraft .