Update a Department.

@param int   $partyId
@param array $name

@return bool
765999
public function update($partyId, array $partyInfo = [])
    {
        $params = array_merge($partyInfo, ['id' => $partyId]);

        return $this->parseJSON('json', [self::API_UPDATE, $params]);
    }
601656
public function update($userId)
    {
        try
        {
            $permissions = Input::get('permissions', array());
            $this->users->updatePermissions($userId,$permissions);

            return Redirect::route('cpanel.users.index')
                ->with('success', Lang::get('cpanel::users.permissions_update_success'));
        }
        catch ( UserNotFoundException $e)
        {
            return Redirect::route('cpanel.users.permissions')
                ->with('error', $e->getMessage());
        }

    }
750759
public function updateNodeSection( $nodeID, $sectionID )
    {
        $contentObject = eZContentObject::fetchByNodeID( $nodeID );
        eZContentOperationCollection::registerSearchObject( $contentObject->attribute( 'id' ) );
    }
1324021
public function updateTagsName($tagid, $name)
    {
        $queryStr = [
            'tag' => [
                'id'   => $tagid,
                'name' => $name,
            ],
        ];

        $res = $this->_post('update', $queryStr);

        return $res;
    }
667655
public function update_one_data_set($tab_name, array $data, $id, $id_name)
    {

        $where = "$id_name = '$id' ";

        return $this->cuUpdate($tab_name, $data, $where);
    }
980446
protected function _update($id, array $data)
    {
        return $this->db->update($this->table, $data, ['id' => $id]);
    }
1019200
public function update($table_name, $id, array $data) {
            Event::dispatch(EventData::forBefore(Event::BEFORE_UPDATE, $table_name, $data), $data);


            $q = $this->config->getSystemIdentifierQuote();

            //update database record
            $sql_query = "UPDATE $q" . $table_name . "$q SET ";

            $statement_params = [':update_id' => $id];
            // keep track of null params for logging output. binding null params
            // was causing foreign key violations (for nullable fields)
            $null_params = [];
            foreach ($data as $field_name => $value) {
                if (strtolower($value) == 'null' || is_null($value)) {
                    $sql_query .= "\n$q" . $field_name . "$q = NULL,";
                    $null_params[ $field_name ] = 'NULL';
                } else {
                    $sql_query .= "\n$q" . $field_name . "$q = :" . $field_name . ",";
                    $statement_params[ ':' . $field_name ] = $value;
                }
            }

            $full_param_list = array_merge($null_params, $statement_params);

            $sql_query = substr($sql_query, 0, -1); // remove trailing comma
            $sql_query .= "\nWHERE $q" . 'id' . "$q = :update_id";
            $sql_query .= ";";

            try {
                //Run update query, collect stats
                $stmt = $this->db_connection->prepare($sql_query);
                if ($statement_params) {
                    foreach ($statement_params as $k => $v) {
                        $stmt->bindValue($k, $v);
                    }
                }

                $stmt->execute();
            } catch (Exception $ex) {
                Event::dispatch(EventData::forException($ex, $sql_query, $full_param_list));

                throw new QueryException($ex->getMessage(), $ex->getCode(), $ex);
            }

            $row_count = $stmt->rowCount();
            Event::dispatch(EventData::forAfter(Event::AFTER_UPDATE, $table_name, $full_param_list, $sql_query, $row_count));

            return $row_count;
        }
98937
public function rename($fileID, $name)
    {
        $data = [
            'file_id' => $fileID,
            'name'    => $name
        ];

        return $this->post('files/rename', $data, \true);
    }
1349935
@Override
    public boolean updatePolicy(String name, String newDocument)
    throws PolicyIndexException {

        writeLock.lock();
        try {
            logger.debug("Updating policy named: " + name);
            if (doDelete(name)) {
                doAdd(name, newDocument);
                return true;
            } else {
                // delete failed
                return false;
            }
        } finally {
            writeLock.unlock();
        }
    }
790947
public function update_group($id, $name = null, $course_name = null, $course_description = null, $course_link = null, $design_id = null){

		$data = array(
		    "group" => array(
		    	"name" => $name,
		    	"course_name" => $course_name,
				"course_description" => $course_description,
    			"course_link" => $course_link,
                "design_id" => $design_id
		    )
		);
		$data = $this->strip_empty_keys($data);

		$client = new \GuzzleHttp\Client();

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

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

		return $result;
	}
1014188
public function update($CampaignId, CampaignDraft $campaignDraft)
    {
        $response = $this->mailjet->put(Resources::$Campaigndraft,
            ['id' => $CampaignId, 'body' => $campaignDraft->format()]);
        if (!$response->success()) {
            $this->throwError("CampaignDraftManager:update() failed", $response);
        }

        return $response->getData();
    }
1324381
public function update($id, array $fields)
    {
        $xml = "<employee>";

        foreach ($fields as $field => $value) {
            $xml .= "<field id=\"{$field}\">{$value}</field>";
        }

        $xml .= "</employee>";

        return $this->post("employees/{$id}", $xml);
    }
1007838
public function updateQuery($tableName, $id)
    {
        $values = self::buildClause($tableName, $this->properties);
        $updateQuery = "UPDATE $tableName SET {$values} WHERE id = $id";

        return $updateQuery;
    }
260569
public function update($category_id, array $data)
    {
        $result = null;
        $this->hook->attach('category.update.before', $category_id, $data, $result, $this);

        if (isset($result)) {
            return (bool) $result;
        }

        $updated = $this->db->update('category', $data, array('category_id' => $category_id));

        $data['category_id'] = $category_id;

        $updated += (int) $this->setTranslations($data, $this->translation_entity, 'category');
        $updated += (int) $this->setImages($data, $this->file, 'category');
        $updated += (int) $this->setAlias($data, $this->alias, 'category');

        $result = $updated > 0;
        $this->hook->attach('category.update.after', $category_id, $data, $result, $this);
        return (bool) $result;
    }
313769
public function updateAbandonedProductName($name, $email, $websiteId)
    {
        if ($this->isEnabled($websiteId)) {
            $client = $this->getWebsiteApiClient($websiteId);
            // id config data mapped
            $field = $this->getAbandonedProductName();

            if ($field) {
                $data[] = [
                    'Key' => $field,
                    'Value' => $name,
                ];
                //update data field for contact
                $client->updateContactDatafieldsByEmail($email, $data);
            }
        }
    }
26514
public function updatePolicy(
        PolicyUpdateData $data,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: sprintf('update-policy-%s', md5(implode('/', $data->getPolicy())));

        return $this->formFactory->createNamed($name, PolicyUpdateType::class, $data);
    }
892497
public function update($tagId, $tagName)
    {
        $params = array(
                    'tagid'   => $tagId,
                    'tagname' => $tagName
                );

        return $this->http->jsonPost(self::API_UPDATE, $params);
    }