book_theme

book_theme() Implements hook_theme(). File core/modules/book/book.module, line 57 Allows users to create and organize related content in an outline. Code function book_theme() { return array( 'book_navigation' => array( 'variables' => array('book_link' => NULL), ), 'book_tree' => array( 'variables' => array('items' => array(), 'attributes' => array()), ), 'book_export_html' => array( 'variables' => array('title' => NULL, 'c

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_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_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_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_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_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_form_node_confirm_form_alter

book_form_node_confirm_form_alter(&$form, FormStateInterface $form_state) Implements hook_form_BASE_FORM_ID_alter() for \Drupal\node\Form\NodeDeleteForm. Alters the confirm form for a single node deletion. File core/modules/book/book.module, line 330 Allows users to create and organize related content in an outline. Code function book_form_node_confirm_form_alter(&$form, FormStateInterface $form_state) { // Only need to alter the delete operation form. if ($form_state->getFormO

book_entity_type_build

book_entity_type_build(array &$entity_types) Implements hook_entity_type_build(). File core/modules/book/book.module, line 80 Allows users to create and organize related content in an outline. Code function book_entity_type_build(array &$entity_types) { /** @var $entity_types \Drupal\Core\Entity\EntityTypeInterface[] */ $entity_types['node'] ->setFormClass('book_outline', 'Drupal\book\Form\BookOutlineForm') ->setLinkTemplate('book-outline-form', '/node/{node}/outline')

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(