function book_node_presave
Implements hook_ENTITY_TYPE_presave() for node entities.
File
- 
              core/modules/ book/ book.module, line 253 
Code
function book_node_presave(EntityInterface $node) {
  // Make sure a new node gets a new menu link.
  if ($node->isNew()) {
    $node->book['nid'] = NULL;
  }
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
