Delete group.

@param string $groupId

@return JsonResponse
@Route("/{groupId}", name="users_groups_delete")
@Method("DELETE")
@ApiDoc(
description="Delete group"
)
485287
public function deleteAction($groupId)
    {
        $groupManager = $this->get('phlexible_user.group_manager');

        $group = $groupManager->find($groupId);
        $name = $group->getName();

        $groupManager->deleteGroup($group);

        $this->get('phlexible_message.message_poster')
            ->post(UsersMessage::create('Group "'.$group->getName().'" deleted.'));

        return new ResultResponse(true, "Group $name deleted.");
    }
989340
public function getDelete($id = null)
    {
        // Get group information
        $group = Sentinel::getRoleRepository()->find($id);

        if ($group == null)
        {
            // Prepare the error message
            $error = Lang::get('base.groups.not_found');

            // Redirect to the post management page
            return Redirect::route('groups')->with('error', $error);
        }

        Base::Log('Group (' . $group->id . ' - ' . $group->name . ') was deleted.');

        // Delete the group
        $group->delete();

        // Prepare the success message
        $success = Lang::get('base.groups.deleted');

        // Redirect to the post management page
        return Redirect::route('groups')->with('success', $success);
    }
262028
def delete_group(self, group_id, force=False):
        
        params = {'force': force}
        response = self._do_request(
            'DELETE', '/v2/groups/{group_id}'.format(group_id=group_id), params=params)
        return response.json()
577286
def delete_user_from_group(self, GroupID, UserID):
        """"""
        # http://teampasswordmanager.com/docs/api-groups/#del_user
        log.info('Delete user %s from group %s' % (UserID, GroupID))
        self.put('groups/%s/delete_user/%s.json' % (GroupID, UserID))
943581
public function delete(string $id)
    {
        $url = $this->url.'/'.$id;

        return $this->curl->delete($url);
    }
1295209
public function delete_group($id){
		$client = new \GuzzleHttp\Client();

		$response = $client->delete($this->api_endpoint.'issuer/groups/' . $id, array('headers' =>  array('Authorization' => 'Token token="'.$this->getAPIKey().'"')));

		$result = json_decode($response->getBody());

		return $result;
	}
136043
public function deleteGroup($group_id)
    {
        $url = "https://api.weixin.qq.com/shakearound/device/group/delete?access_token=ACCESS_TOKEN";
        $this->registerApi($url, __FUNCTION__, func_get_args());
        return $this->httpPostForJson($url, ['group_id' => $group_id]);
    }
4183
def group_delete(self, id, **kwargs):
        ""
        api_path = "/api/v2/groups/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, method="DELETE", **kwargs)
346303
public function removeGroupAction(Request $request, $groupId)
    {
        $format = $request->get('_format', 'json');

        $facade = $this->get('jms_serializer')->deserialize(
            $request->getContent(),
            $this->getParameter('open_orchestra_user_admin.facade.user.class'),
            $format
        );
        $user = $this->get('open_orchestra_api.transformer_manager')->reverseTransform('user', $facade);
        if (!$user instanceof UserInterface) {
            throw new UserNotFoundHttpException();
        }
        $this->denyAccessUnlessGranted(ContributionActionInterface::EDIT, $user);

        $this->get('open_orchestra_user.repository.user')->removeGroup($user->getId(), $groupId);

        return array();
    }
1368464
public ResultType deleteGroup(Integer groupId){
        BeanUtil.requireNonNull(groupId, "groupId is null");
        LOG.debug("删除分组.....");
        String url = BASE_API_URL + "cgi-bin/groups/delete?access_token=#";
        Map<String, Object> param = new HashMap<String, Object>();
        Map<String, Integer> groups = new HashMap<String, Integer>();
        groups.put("id", groupId);
        param.put("group", groups);
        BaseResponse response = executePost(url, JSONUtil.toJson(param));
        return ResultType.get(response.getErrcode());
    }
1162276
public function actionDelete( $id ) {

		$model	= $this->modelService->getById( $id );

		if( GroupService::delete( $model, $model->content ) ) {

			return AjaxUtil::generateSuccess( Yii::$app->coreMessage->getMessage( CoreGlobal::MESSAGE_REQUEST ) );
		}

		// Trigger Ajax Not Found
        return AjaxUtil::generateFailure( Yii::$app->coreMessage->getMessage( CoreGlobal::ERROR_NOT_FOUND ) );
	}
443101
public function deleteAction($groupId)
    {
        $group = $this->get('open_orchestra_user.repository.group')->find($groupId);
        $this->denyAccessUnlessGranted(ContributionActionInterface::DELETE, $group);

        if ($group instanceof GroupInterface && $this->get('open_orchestra_backoffice.business_rules_manager')->isGranted(BusinessActionInterface::DELETE, $group)) {
            $objectManager = $this->get('object_manager');
            $objectManager->remove($group);
            $objectManager->flush();
            $this->dispatchEvent(GroupEvents::GROUP_DELETE, new GroupEvent($group));
        }

        return array();
    }
1226686
function delete_group($gid)
    {
        // flag group record as deleted
        $this->db->query(
            "UPDATE " . $this->db->table_name($this->db_groups, true)
            . " SET `del` = 1, `changed` = " . $this->db->now()
            . " WHERE `contactgroup_id` = ?"
                . " AND `user_id` = ?",
            $gid, $this->user_id
        );

        $this->cache = null;

        return $this->db->affected_rows();
    }
364745
public Response deleteGroup(String groupName) {
		return restClient.delete("groups/" + groupName, new HashMap<String, String>());
	}
990655
public function deleteGroup($groupId)
    {
        try {
            return $this->innerGateway->deleteGroup($groupId);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
130436
public function removeSubscriber($groupId, $subscriberId)
    {
        $endpoint = $this->endpoint . '/' . $groupId . '/subscribers/' . urlencode($subscriberId);

        $response = $this->restClient->delete($endpoint);

        return $response['body'];
    }
1165183
public function groupUserQuery( $groupId ) {
        try{
            if(empty($groupId))
                throw new Exception('要加入的群 Id 不能为空');
            $ret = $this->curl('/group/user/query',
                    array('groupId' => $groupId)
            );
            if(empty($ret))
                throw new Exception('请求失败');
            return $ret;
        }catch (Exception $e) {
            print_r($e->getMessage());
        }
    }