W3cubDocs

/Drupal 8

public function Merge::updateFields

public Merge::updateFields(array $fields)

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

\Drupal\Core\Database\Query\Merge The called object.

File

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

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;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Database!Query!Merge.php/function/Merge::updateFields/8.1.x