Updates an object state group.

@param mixed $groupId
@param \eZ\Publish\SPI\Persistence\Content\ObjectState\InputStruct $input

@return \eZ\Publish\SPI\Persistence\Content\ObjectState\Group
13733
public function updateGroup($groupId, InputStruct $input)
    {
        $objectStateGroup = $this->objectStateMapper->createObjectStateGroupFromInputStruct($input);
        $objectStateGroup->id = (int)$groupId;

        $this->objectStateGateway->updateObjectStateGroup($objectStateGroup);

        return $this->loadGroup($objectStateGroup->id);
    }
525552
public function update(array $input, $id, Model $model = null, $attribute = 'id')
    {
        if ($model == null) {
            $model = $this->find($id, $attribute);
        }

        $model->update($this->onlyFillable($input));

        return $model;
    }
861348
public function insertGroupAssignment($groupId, $typeId, $status)
    {
        $groups = $this->loadGroupData([$groupId]);
        $group = $groups[0];

        $q = $this->dbHandler->createInsertQuery();
        $q->insertInto(
            $this->dbHandler->quoteTable('ezcontentclass_classgroup')
        )->set(
            $this->dbHandler->quoteColumn('contentclass_id'),
            $q->bindValue($typeId, null, \PDO::PARAM_INT)
        )->set(
            $this->dbHandler->quoteColumn('contentclass_version'),
            $q->bindValue($status, null, \PDO::PARAM_INT)
        )->set(
            $this->dbHandler->quoteColumn('group_id'),
            $q->bindValue($groupId, null, \PDO::PARAM_INT)
        )->set(
            $this->dbHandler->quoteColumn('group_name'),
            $q->bindValue($group['name'])
        );

        $q->prepare()->execute();
    }
1306068
public function loadObjectStates($objectStateGroupId)
    {
        $objectStateGroup = $this->objectStateService->loadObjectStateGroup($objectStateGroupId);

        return new Values\ObjectStateList(
            $this->objectStateService->loadObjectStates($objectStateGroup, Language::ALL),
            $objectStateGroup->id
        );
    }
57650
public ResultType updateGroup(Integer groupid, String name) {
        BeanUtil.requireNonNull(groupid, "groupid is null");
        BeanUtil.requireNonNull(name, "name is null");
        LOG.debug("修改分组信息.....");
        String url = BASE_API_URL + "cgi-bin/groups/update?access_token=#";
        Map<String, Object> param = new HashMap<String, Object>();
        Map<String, Object> group = new HashMap<String, Object>();
        group.put("id", groupid);
        group.put("name", name);
        param.put("group", group);
        BaseResponse response = executePost(url, JSONUtil.toJson(param));
        return ResultType.get(response.getErrcode());
    }
717002
public function deleteObjectStateGroup($objectStateGroupId)
    {
        $this->objectStateService->deleteObjectStateGroup(
            $this->objectStateService->loadObjectStateGroup($objectStateGroupId)
        );

        return new Values\NoContent();
    }
687818
public function deleteGroup($groupId)
    {
        return $this->auth(function () use ($groupId) {
            return $this->http->postJson(
                $this->baseUrl . 'cgi-bin/groups/delete?access_token=' . $this->accessToken,
                json_encode(
                    [
                        'group' => [
                            'id' => $groupId,
                        ],
                    ],
                    JSON_UNESCAPED_UNICODE
                )
            );
        });
    }
577647
public Group updateGroup(final String id, final GroupRequest groupRequest) throws UnauthorizedException, GeneralException {
        if (id == null) {
            throw new IllegalArgumentException("Group ID must be specified.");
        }
        String path = String.format("%s/%s", GROUPPATH, id);
        return messageBirdService.sendPayLoad("PATCH", path, groupRequest, Group.class);
    }
67528
public function insertObjectState(ObjectState $objectState, $groupId)
    {
        $query = $this->dbHandler->createSelectQuery();
        $query->select(
            $query->expr->max($this->dbHandler->quoteColumn('priority'))
        )->from(
            $this->dbHandler->quoteTable('ezcobj_state')
        )->where(
            $query->expr->eq(
                $this->dbHandler->quoteColumn('group_id'),
                $query->bindValue($groupId, null, \PDO::PARAM_INT)
            )
        );

        $statement = $query->prepare();
        $statement->execute();

        $maxPriority = $statement->fetchColumn();

        $objectState->priority = $maxPriority === null ? 0 : (int)$maxPriority + 1;
        $objectState->groupId = (int)$groupId;

        $query = $this->dbHandler->createInsertQuery();
        $query->insertInto(
            $this->dbHandler->quoteTable('ezcobj_state')
        )->set(
            $this->dbHandler->quoteColumn('id'),
            $this->dbHandler->getAutoIncrementValue('ezcobj_state', 'id')
        )->set(
            $this->dbHandler->quoteColumn('group_id'),
            $query->bindValue($objectState->groupId, null, \PDO::PARAM_INT)
        )->set(
            $this->dbHandler->quoteColumn('default_language_id'),
            $query->bindValue(
                $this->maskGenerator->generateLanguageIndicator($objectState->defaultLanguage, false),
                null,
                \PDO::PARAM_INT
            )
        )->set(
            $this->dbHandler->quoteColumn('identifier'),
            $query->bindValue($objectState->identifier)
        )->set(
            $this->dbHandler->quoteColumn('language_mask'),
            $query->bindValue(
                $this->maskGenerator->generateLanguageMaskFromLanguageCodes($objectState->languageCodes, true),
                null,
                ParameterType::INTEGER
            )
        )->set(
            $this->dbHandler->quoteColumn('priority'),
            $query->bindValue($objectState->priority, null, \PDO::PARAM_INT)
        );

        $query->prepare()->execute();

        $objectState->id = (int)$this->dbHandler->lastInsertId(
            $this->dbHandler->getSequenceName('ezcobj_state', 'id')
        );

        $this->insertObjectStateTranslations($objectState);

        // If this is a first state in group, assign it to all content objects
        if ($maxPriority === null) {
            // @todo Hm... How do we perform this with query object?
            $this->dbHandler->prepare(
                "INSERT INTO ezcobj_state_link (contentobject_id, contentobject_state_id)
                SELECT id, {$objectState->id} FROM ezcontentobject"
            )->execute();
        }
    }
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);
	}
777822
public function update(int $id, array $input)
    {
        $this->cache->tags($this->getModel())->flush();
        return $this->repository->update($id, $input);
    }
17950
public function createObjectStateFromInputStruct(InputStruct $input)
    {
        $objectState = new ObjectState();

        $objectState->identifier = $input->identifier;
        $objectState->defaultLanguage = $input->defaultLanguage;
        $objectState->name = $input->name;
        $objectState->description = $input->description;

        $objectState->languageCodes = array();
        foreach ($input->name as $languageCode => $name) {
            $objectState->languageCodes[] = $languageCode;
        }

        return $objectState;
    }
586178
public function insertObjectState(ObjectState $objectState, $groupId)
    {
        try {
            return $this->innerGateway->insertObjectState($objectState, $groupId);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
634251
public function updateGroup(GroupUpdateStruct $group)
    {
        try {
            return $this->innerGateway->updateGroup($group);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
693200
public function updateGroup(GroupUpdateStruct $struct)
    {
        $this->contentTypeGateway->updateGroup(
            $struct
        );

        return $this->loadGroup($struct->id);
    }
48053
public function setGroupId($group_id)
    {
        if ($group_id instanceof GroupId) {
            $this->group_id = $group_id->getGroupId();
        } else {
            if (!is_int($group_id)) {
                throw new TypeException(
                    '$group_id must be an instance of Twilio SendGrid\Mail\GroupId or of type int.'
                );
            }
            $this->group_id = new GroupId($group_id);
        }
        return;
    }
33899
protected function callRepository($input)
    {
        if($this->isUpdate($input))
        {
            try
            {
                $obj = $this->r->update($input[$this->id_name], $input);
            }
            catch(ModelNotFoundException $e)
            {
                $this->errors = new MessageBag(array("model" => "Elemento non trovato"));
                throw new NotFoundException();
            }
            catch(PermissionException $e)
            {
                $this->errors = new MessageBag(array("model" => "Non è possibile modificare questo elemento"));
                throw new PermissionException();
            }
        }
        else
        {
            try
            {
                $obj = $this->r->create($input);
            }
            catch(NotFoundException $e)
            {
                $this->errors = new MessageBag(array("model" => $e->getMessage()));
                throw new NotFoundException();
            }
        }
        return $obj;
    }