BookManager::getLinkDefaults

public BookManager::getLinkDefaults($nid)

Returns an array with default values for a book page's menu link.

Parameters

string|int $nid: The ID of the node whose menu link is being created.

Return value

array The default values for the menu link.

Overrides BookManagerInterface::getLinkDefaults

File

core/modules/book/src/BookManager.php, line 119

Class

BookManager
Defines a book manager.

Namespace

Drupal\book

Code

public function getLinkDefaults($nid) {
  return array(
    'original_bid' => 0,
    'nid' => $nid,
    'bid' => 0,
    'pid' => 0,
    'has_children' => 0,
    'weight' => 0,
    'options' => array(),
  );
}
doc_Drupal
2016-10-29 08:48:11
Comments
Leave a Comment

Please login to continue.