Returns a group object, initiated from the database or from
Group::$_noGroup when the database does not yet exist.

@param int $groupId Group id
@return \Gems\User\Group
359993
public function getGroup($groupId)
    {
        static $groups = array();

        if (! isset($groups[$groupId])) {
            $groups[$groupId] = $this->_loadClass('Group', true, array($groupId));
    }

        return $groups[$groupId];
    }
1223269
public function fetchGroupMembers($groupId)
    {
        $result = $this->_get($this->_groupUrl($groupId, '/members'));
        return Deserialize::groupMembers($result);
    }
447865
public function delete($groupId)
    {
        $this->requireAdmin();
        $group = $this->groupStore->getById($groupId);

        $this->groupStore->delete($group);
        $response = new b8\Http\Response\RedirectResponse();
        $response->setHeader('Location', PHPCI_URL.'group');
        return $response;
    }
1343451
public function findById($id)
    {
        try
        {
            return $this->sentry->getGroupProvider()->findById($id);
        }
        catch (SentryGroupNotFoundException $e)
        {
            throw new GroupNotFoundException($e->getMessage());
        }
    }
1199812
public function leaveGroup($groupId)
	{
		$token = $this->oauth->getToken();

		// Set parameters.
		$parameters = array(
			'oauth_token' => $token['key'],
		);

		// Set the success response code.
		$this->oauth->setOption('success_code', 204);

		// Set the API base
		$base = '/v1/people/~/group-memberships/' . $groupId;

		// Build the request path.
		$path = $this->getOption('api.url') . $base;

		// Send the request.
		$response = $this->oauth->oauthRequest($path, 'DELETE', $parameters);

		return $response;
	}
178316
public function stepCreateMemberWithGroup($id, $groupId) {
		$group = $this->fixtureFactory->get('Group', $groupId);
		if(!$group) $group = $this->fixtureFactory->createObject('Group', $groupId);
		
		$member = $this->fixtureFactory->createObject('Member', $id);
		$member->Groups()->add($group);
	}
932943
public function getGroup($id)
    {
        if (!array_key_exists($id, $this->groups_by_id)) {
            throw new SwatWidgetNotFoundException(
                "Group with an id of '{$id}' not found."
            );
        }

        return $this->groups_by_id[$id];
    }
1311212
public function showGroup( $groupId )
    {
        $collection = $this->repository->getAppointmentsByParam( ['groupId' => $groupId ] );
        return $this->buildBundle( $collection );
    }
447892
public function deleteGroup($groupId)
    {
        $result = $this->wechat->httpRaw(self::WECHAT_GROUP_DELETE_PREFIX, [
            'group_id' => $groupId
        ], [
            'access_token' => $this->wechat->getAccessToken()
        ]);
        return isset($result['errmsg']) && $result['errmsg'] == 'success';
    }
564464
public function groupUserGagList($groupId) {
        try{
            if(empty($groupId))
                throw new Exception('群组 Id 不能为空');
            $params['groupId'] = $groupId;
            $ret = $this->curl('/group/user/gag/list',$params);
            if(empty($ret))
                throw new Exception('请求失败');
            return $ret;
        }catch (Exception $e) {
            print_r($e->getMessage());
        }
    }
318112
public function getGroupCipher($groupId)
    {
        if (!isset($this->groupCiphers[$groupId])) {
            $this->groupCiphers[$groupId] = new GroupCipher($this->axolotlStore, $groupId);
        }

        return $this->groupCiphers[$groupId];
    }
971653
public function groupDelete($group_id){
        $params=array(
            'group_id'=>$group_id
        );
        $rst = $this->_request->post($this->_url . 'group/delete', $params);
        return $this->_client->rst($rst);
    }
85161
public function loadGroupData(array $groupIds)
    {
        $q = $this->connection->createQueryBuilder();
        $q
            ->select('created', 'creator_id', 'id', 'modified', 'modifier_id', 'name')
            ->from('ezcontentclassgroup')
            ->where($q->expr()->in('id', ':ids'))
            ->setParameter('ids', $groupIds, Connection::PARAM_INT_ARRAY);

        return $q->execute()->fetchAll();
    }
1271530
public function edit($groupId = null)
    {
        $this->requireAdmin();

        if (!is_null($groupId)) {
            $group = $this->groupStore->getById($groupId);
        } else {
            $group = new ProjectGroup();
        }

        if ($this->request->getMethod() == 'POST') {
            $group->setTitle($this->getParam('title'));
            $this->groupStore->save($group);

            $response = new b8\Http\Response\RedirectResponse();
            $response->setHeader('Location', PHPCI_URL.'group');
            return $response;
        }

        $form = new Form();
        $form->setMethod('POST');
        $form->setAction(PHPCI_URL . 'group/edit' . (!is_null($groupId) ? '/' . $groupId : ''));

        $title = new Form\Element\Text('title');
        $title->setContainerClass('form-group');
        $title->setClass('form-control');
        $title->setLabel('Group Title');
        $title->setValue($group->getTitle());

        $submit = new Form\Element\Submit();
        $submit->setValue('Save Group');

        $form->addField($title);
        $form->addField($submit);

        $this->view->form = $form;
    }
909269
public function groupAdd($groupId, $options=array()){

        $data = array();
        
        $data['group_id'] = $groupId;

        $data = array_merge($data, $options);

        return $this->request($this->groupAddUrl, $data);
    }
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());
        }
    }
50106
public function deleteShopGroup($groupId)
    {
        $result = $this->httpRaw(self::WECHAT_SHOP_GROUP_DELETE_URL . 'access_token=' . $this->getAccessToken(), [
            'group_id' => $groupId
        ]);
        return isset($result['errmsg']) && $result['errmsg'] == 'success';
    }