public function BookManager::getLinkDefaults in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/book/src/BookManager.php \Drupal\book\BookManager::getLinkDefaults()
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
1 call to BookManager::getLinkDefaults()
- BookManager::saveBookLink in core/
modules/ book/ src/ BookManager.php - Saves a single book entry.
File
- core/
modules/ book/ src/ BookManager.php, line 124 - Contains \Drupal\book\BookManager.
Class
- BookManager
- Defines a book manager.
Namespace
Drupal\bookCode
public function getLinkDefaults($nid) {
return array(
'original_bid' => 0,
'nid' => $nid,
'bid' => 0,
'pid' => 0,
'has_children' => 0,
'weight' => 0,
'options' => array(),
);
}