eZ\Publish\Core\REST\Server\Controller\Role::unassignRoleFromUserGroup PHP Method

unassignRoleFromUserGroup() public method

Un-assigns role from user group.
public unassignRoleFromUserGroup ( $groupPath, $roleId ) : RoleAssignmentList
$groupPath
$roleId
return eZ\Publish\Core\REST\Server\Values\RoleAssignmentList
    public function unassignRoleFromUserGroup($groupPath, $roleId)
    {
        $groupLocationParts = explode('/', $groupPath);
        $groupLocation = $this->locationService->loadLocation(array_pop($groupLocationParts));
        $userGroup = $this->userService->loadUserGroup($groupLocation->contentId);
        $role = $this->roleService->loadRole($roleId);
        $this->roleService->unassignRoleFromUserGroup($role, $userGroup);
        $roleAssignments = $this->roleService->getRoleAssignmentsForUserGroup($userGroup);
        return new Values\RoleAssignmentList($roleAssignments, $groupPath, true);
    }