You are here

public function BookOutlineStorage::update in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/book/src/BookOutlineStorage.php \Drupal\book\BookOutlineStorage::update()
  2. 10 core/modules/book/src/BookOutlineStorage.php \Drupal\book\BookOutlineStorage::update()

Updates book reference for links that were moved between books.

Parameters

int $nid: The nid of the book entry to be updated.

array $fields: The array of fields to be updated.

Return value

mixed The number of rows matched by the update query.

Overrides BookOutlineStorageInterface::update

File

core/modules/book/src/BookOutlineStorage.php, line 144

Class

BookOutlineStorage
Defines a storage class for books outline.

Namespace

Drupal\book

Code

public function update($nid, $fields) {
  return $this->connection
    ->update('book')
    ->fields($fields)
    ->condition('nid', $nid)
    ->execute();
}