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);
    }
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);
    }
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 ) ; }
Un-assigns role from user group.

@param $groupPath
@param $roleId

@return \eZ\Publish\Core\REST\Server\Values\RoleAssignmentList
Un - assigns role from user group .