eZ\Publish\Core\Persistence\Legacy\User\Handler::deleteRole PHP Method

deleteRole() public method

Delete the specified role (draft).
public deleteRole ( mixed $roleId, integer $status = Role::STATUS_DEFINED )
$roleId mixed
$status integer 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);
    }