book_node_presave

book_node_presave(EntityInterface $node) Implements hook_ENTITY_TYPE_presave() for node entities. File core/modules/book/book.module, line 252 Allows users to create and organize related content in an outline. Code function book_node_presave(EntityInterface $node) { // Make sure a new node gets a new menu link. if ($node->isNew()) { $node->book['nid'] = NULL; } }

book_node_prepare_form

book_node_prepare_form(NodeInterface $node, $operation, FormStateInterface $form_state) Implements hook_ENTITY_TYPE_prepare_form() for node entities. File core/modules/book/book.module, line 291 Allows users to create and organize related content in an outline. Code function book_node_prepare_form(NodeInterface $node, $operation, FormStateInterface $form_state) { /** @var \Drupal\book\BookManagerInterface $book_manager */ $book_manager = \Drupal::service('book.manager'); // Prepare def

book_node_predelete

book_node_predelete(EntityInterface $node) Implements hook_ENTITY_TYPE_predelete() for node entities. File core/modules/book/book.module, line 280 Allows users to create and organize related content in an outline. Code function book_node_predelete(EntityInterface $node) { if (!empty($node->book['bid'])) { /** @var \Drupal\book\BookManagerInterface $book_manager */ $book_manager = \Drupal::service('book.manager'); $book_manager->deleteFromBook($node->book['nid']); } }

book_node_load

book_node_load($nodes) Implements hook_ENTITY_TYPE_load() for node entities. File core/modules/book/book.module, line 214 Allows users to create and organize related content in an outline. Code function book_node_load($nodes) { /** @var \Drupal\book\BookManagerInterface $book_manager */ $book_manager = \Drupal::service('book.manager'); $links = $book_manager->loadBookLinks(array_keys($nodes), FALSE); foreach ($links as $record) { $nodes[$record['nid']]->book = $record; $

book_node_links_alter

book_node_links_alter(array &$links, NodeInterface $node, array &$context) Implements hook_node_links_alter(). File core/modules/book/book.module, line 91 Allows users to create and organize related content in an outline. Code function book_node_links_alter(array &$links, NodeInterface $node, array &$context) { if ($context['view_mode'] != 'rss') { $account = \Drupal::currentUser(); if (isset($node->book['depth'])) { if ($context['view_mode'] == 'full' &

book_node_insert

book_node_insert(EntityInterface $node) Implements hook_ENTITY_TYPE_insert() for node entities. File core/modules/book/book.module, line 262 Allows users to create and organize related content in an outline. Code function book_node_insert(EntityInterface $node) { /** @var \Drupal\book\BookManagerInterface $book_manager */ $book_manager = \Drupal::service('book.manager'); $book_manager->updateOutline($node); }

book_node_builder

book_node_builder($entity_type, NodeInterface $entity, &$form, FormStateInterface $form_state) Entity form builder to add the book information to the node. @todo: Remove this in favor of an entity field. File core/modules/book/book.module, line 171 Allows users to create and organize related content in an outline. Code function book_node_builder($entity_type, NodeInterface $entity, &$form, FormStateInterface $form_state) { $entity->book = $form_state->getValue('book'); // A

book_help

book_help($route_name, RouteMatchInterface $route_match) Implements hook_help(). File core/modules/book/book.module, line 24 Allows users to create and organize related content in an outline. Code function book_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { case 'help.page.book': $output = '<h3>' . t('About') . '</h3>'; $output .= '<p>' . t('The Book module is used for creating structured, multi-page content, such as site resou

book_form_update

book_form_update($form, FormStateInterface $form_state) Renders a new parent page select element when the book selection changes. This function is called via Ajax when the selected book is changed on a node or book outline form. Return value The rendered parent page select element. File core/modules/book/book.module, line 207 Allows users to create and organize related content in an outline. Code function book_form_update($form, FormStateInterface $form_state) { return $form['book']['pid']

book_form_node_form_alter

book_form_node_form_alter(&$form, FormStateInterface $form_state, $form_id) Implements hook_form_BASE_FORM_ID_alter() for \Drupal\node\NodeForm. Adds the book form element to the node form. See also book_pick_book_nojs_submit() File core/modules/book/book.module, line 136 Allows users to create and organize related content in an outline. Code function book_form_node_form_alter(&$form, FormStateInterface $form_state, $form_id) { $node = $form_state->getFormObject()->getEntity(