function BookManagerInterface::saveBookLink

Same name in other branches
  1. 8.9.x core/modules/book/src/BookManagerInterface.php \Drupal\book\BookManagerInterface::saveBookLink()
  2. 10 core/modules/book/src/BookManagerInterface.php \Drupal\book\BookManagerInterface::saveBookLink()
  3. 11.x core/modules/book/src/BookManagerInterface.php \Drupal\book\BookManagerInterface::saveBookLink()

Saves a link for a single book entry to the book.

Parameters

array $link: The link data to save. $link['nid'] must be set. Other keys in this array get default values from \Drupal\book\BookManagerInterface::getLinkDefaults(). The array keys available to be set are documented in \Drupal\book\BookOutlineStorageInterface::loadMultiple().

bool $new: Whether this is a link to a new book entry.

Return value

array The book entry link information. This is $link with values added or updated.

See also

\Drupal\book\BookManagerInterface::getLinkDefaults()

\Drupal\book\BookOutlineStorageInterface::loadMultiple()

1 method overrides BookManagerInterface::saveBookLink()
BookManager::saveBookLink in core/modules/book/src/BookManager.php
Saves a link for a single book entry to the book.

File

core/modules/book/src/BookManagerInterface.php, line 204

Class

BookManagerInterface
Provides an interface defining a book manager.

Namespace

Drupal\book

Code

public function saveBookLink(array $link, $new);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.