function BookManager::getLinkDefaults

Same name and namespace in other branches
  1. 8.9.x core/modules/book/src/BookManager.php \Drupal\book\BookManager::getLinkDefaults()
  2. 10 core/modules/book/src/ProxyClass/BookManager.php \Drupal\book\ProxyClass\BookManager::getLinkDefaults()
  3. 10 core/modules/book/src/BookManager.php \Drupal\book\BookManager::getLinkDefaults()
  4. 11.x core/modules/book/src/ProxyClass/BookManager.php \Drupal\book\ProxyClass\BookManager::getLinkDefaults()
  5. 11.x core/modules/book/src/BookManager.php \Drupal\book\BookManager::getLinkDefaults()

Overrides BookManagerInterface::getLinkDefaults

1 call to BookManager::getLinkDefaults()
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/BookManager.php, line 192

Class

BookManager
Defines a book manager.

Namespace

Drupal\book

Code

public function getLinkDefaults($nid) {
    return [
        'original_bid' => 0,
        'nid' => $nid,
        'bid' => 0,
        'pid' => 0,
        'has_children' => 0,
        'weight' => 0,
        'options' => [],
    ];
}

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