You are here

public function Merge::updateFields in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Database/Query/Merge.php \Drupal\Core\Database\Query\Merge::updateFields()

Adds a set of field->value pairs to be updated.

Parameters

$fields: An associative array of fields to write into the database. The array keys are the field names and the values are the values to which to set them.

Return value

$this The called object.

File

core/lib/Drupal/Core/Database/Query/Merge.php, line 169

Class

Merge
General class for an abstracted MERGE query operation.

Namespace

Drupal\Core\Database\Query

Code

public function updateFields(array $fields) {
  $this->updateFields = $fields;
  $this->needsUpdate = TRUE;
  return $this;
}