1. 7 modules/book/book.module
  2. 4.6 modules/book.module
  3. 4.7 modules/book.module
  4. 5 modules/book/book.module
  5. 6 modules/book/book.module
  6. 8 core/modules/book/book.module

Allows users to create and organize related content in an outline.


Namespacer Description
book_admin_paths Implements hook_admin_paths().
book_block_configure Implements hook_block_configure().
book_block_info Implements hook_block_info().
book_block_save Implements hook_block_save().
book_block_view Implements hook_block_view().
book_children Formats the menu links for the child pages of the current page.
book_entity_info_alter Implements hook_entity_info_alter().
book_export_traverse Traverses the book tree to build printable or exportable output.
book_form_node_delete_confirm_alter Implements hook_form_FORM_ID_alter() for node_delete_confirm().
book_form_node_form_alter Implements hook_form_BASE_FORM_ID_alter() for node_form().
book_form_update Renders a new parent page select element when the book selection changes.
book_get_books Returns an array of all books.
book_get_flat_menu Gets the book menu tree for a page and returns it as a linear array.
book_help Implements hook_help().
book_link_load Gets a book menu link by its menu link ID.
book_menu Implements hook_menu().
book_menu_name Generates the corresponding menu name from a book ID.
book_menu_subtree_data Gets the data representing a subtree of the book hierarchy.
book_next Fetches the menu link for the next page of the book.
book_node_delete Implements hook_node_delete().
book_node_export Generates printer-friendly HTML for a node.
book_node_insert Implements hook_node_insert().
book_node_load Implements hook_node_load().
book_node_prepare Implements hook_node_prepare().
book_node_presave Implements hook_node_presave().
book_node_type_update Implements hook_node_type_update().
book_node_update Implements hook_node_update().
book_node_view Implements hook_node_view().
book_node_view_link Adds relevant book links to the node's links.
book_page_alter Implements hook_page_alter().
book_permission Implements hook_permission().
book_pick_book_nojs_submit Form submission handler for node_form().
book_prev Fetches the menu link for the previous page of the book.
book_theme Implements hook_theme().
book_toc Returns an array of book pages in table of contents order.
book_type_is_allowed Determine if a given node type is in the list of types allowed for books.
book_update_bid Updates the book ID of a page and its children when it moves to a new book.
template_preprocess_book_all_books_block Processes variables for book-all-books-block.tpl.php.
template_preprocess_book_export_html Processes variables for book-export-html.tpl.php.
template_preprocess_book_navigation Processes variables for book-navigation.tpl.php.
template_preprocess_book_node_export_html Processes variables for book-node-export-html.tpl.php.
theme_book_title_link Returns HTML for a link to a book title when used as a block title.
_book_add_form_elements Builds the common elements of the book form for the node and outline forms.
_book_flatten_menu Recursively converts a tree of menu links to a flat array.
_book_link_defaults Returns an array with default values for a book page's menu link.
_book_node_is_removable Determines if a node can be removed from the book.
_book_outline_access Access callback: Determines if the outline tab is accessible.
_book_outline_remove_access Access callback: Determines if the user can remove nodes from the outline.
_book_parent_depth_limit Finds the depth limit for items in the parent select.
_book_parent_select Builds the parent selection form element for the node form or outline tab.
_book_toc_recurse Recursively processes and formats menu items for book_toc().
_book_update_outline Handles additions and updates to the book outline.


View source
  1. <?php
  2. /**
  3. * @file
  4. * Allows users to create and organize related content in an outline.
  5. */
  6. /**
  7. * Implements hook_help().
  8. */
  9. function book_help($path, $arg) {
  10. switch ($path) {
  11. case 'admin/help#book':
  12. $output = '<h3>' . t('About') . '</h3>';
  13. $output .= '<p>' . t('The Book module is used for creating structured, multi-page content, such as site resource guides, manuals, and wikis. It allows you to create content that has chapters, sections, subsections, or any similarly-tiered structure. For more information, see the online handbook entry for <a class="@book">Book module</a>.', array('@book' => '')) . '</p>';
  14. $output .= '<h3>' . t('Uses') . '</h3>';
  15. $output .= '<dl>';
  16. $output .= '<dt>' . t('Adding and managing book content') . '</dt>';
  17. $output .= '<dd>' . t('You can assign separate permissions for <em>creating</em>, <em>editing</em>, and <em>deleting</em> book content, as well as <em>adding content to books</em>, and <em>creating new books</em>. Users with the <em>Administer book outlines</em> permission can add <em>any</em> type of content to a book by selecting the appropriate book outline while editing the content. They can also view a list of all books, and edit and rearrange section titles on the <a class="@admin-book">Book administration page</a>.', array('@admin-book' => url('admin/content/book'))) . '</dd>';
  18. $output .= '<dt>' . t('Book navigation') . '</dt>';
  19. $output .= '<dd>' . t("Book pages have a default book-specific navigation block. This navigation block contains links that lead to the previous and next pages in the book, and to the level above the current page in the book's structure. This block can be enabled on the <a class='@admin-block'>Blocks administration page</a>. For book pages to show up in the book navigation, they must be added to a book outline.", array('@admin-block' => url('admin/structure/block'))) . '</dd>';
  20. $output .= '<dt>' . t('Collaboration') . '</dt>';
  21. $output .= '<dd>' . t('Books can be created collaboratively, as they allow users with appropriate permissions to add pages into existing books, and add those pages to a custom table of contents menu.') . '</dd>';
  22. $output .= '<dt>' . t('Printing books') . '</dt>';
  23. $output .= '<dd>' . t("Users with the <em>View printer-friendly books</em> permission can select the <em>printer-friendly version</em> link visible at the bottom of a book page's content to generate a printer-friendly display of the page and all of its subsections.") . '</dd>';
  24. $output .= '</dl>';
  25. return $output;
  26. case 'admin/content/book':
  27. return '<p>' . t('The book module offers a means to organize a collection of related content pages, collectively known as a book. When viewed, this content automatically displays links to adjacent book pages, providing a simple navigation system for creating and reviewing structured content.') . '</p>';
  28. case 'node/%/outline':
  29. return '<p>' . t('The outline feature allows you to include pages in the <a class="@book">Book hierarchy</a>, as well as move them within the hierarchy or to <a class="@book-admin">reorder an entire book</a>.', array('@book' => url('book'), '@book-admin' => url('admin/content/book'))) . '</p>';
  30. }
  31. }
  32. /**
  33. * Implements hook_theme().
  34. */
  35. function book_theme() {
  36. return array(
  37. 'book_navigation' => array(
  38. 'variables' => array('book_link' => NULL),
  39. 'template' => 'book-navigation',
  40. ),
  41. 'book_export_html' => array(
  42. 'variables' => array('title' => NULL, 'contents' => NULL, 'depth' => NULL),
  43. 'template' => 'book-export-html',
  44. ),
  45. 'book_admin_table' => array(
  46. 'render element' => 'form',
  47. ), is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.