/**
* Delete the specified role (draft).
*
* @param mixed $roleId
* @param int $status One of Role::STATUS_DEFINED|Role::STATUS_DRAFT
*/
public function deleteRole($roleId, $status = Role::STATUS_DEFINED)
{
$role = $this->loadRole($roleId, $status);
foreach ($role->policies as $policy) {
$this->roleGateway->removePolicy($policy->id);
}
$this->roleGateway->deleteRole($role->id, $status);
}