function BookManagerInterface::saveBookLink

Same name and namespace in other branches
  1. 9 core/modules/book/src/BookManagerInterface.php \Drupal\book\BookManagerInterface::saveBookLink()
  2. 8.9.x core/modules/book/src/BookManagerInterface.php \Drupal\book\BookManagerInterface::saveBookLink()
  3. 10 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()

File

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

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.