function book_help in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/book/book.module \book_help()
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 resource guides, manuals, and wikis. It allows you to create content that has chapters, sections, subsections, or any similarly-tiered structure. Enabling the module creates a new content type <em>Book page</em>. For more information, see the <a href=":book">online documentation for the Book module</a>.', array(
':book' => 'https://www.drupal.org/documentation/modules/book',
)) . '</p>';
$output .= '<h3>' . t('Uses') . '</h3>';
$output .= '<dl>';
$output .= '<dt>' . t('Adding and managing book content') . '</dt>';
$output .= '<dd>' . t('Books have a hierarchical structure, called a <em>book outline</em>. Each book outline can have nested pages up to nine levels deep. Multiple content types can be configured to behave as a book outline. From the content edit form, it is possible to add a page to a book outline or create a new book.') . '</dd>';
$output .= '<dd>' . t('You can assign separate permissions for <em>creating new books</em> as well as <em>creating</em>, <em>editing</em> and <em>deleting</em> book content. 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 href=":admin-book">Book list page</a>.', array(
':admin-book' => \Drupal::url('book.admin'),
)) . '</dd>';
$output .= '<dt>' . t('Configuring content types for books') . '</dt>';
$output .= '<dd>' . t('The <em>Book page</em> content type is the initial content type enabled for book outlines. On the <a href=":admin-settings">Book settings page</a> you can configure content types that can used in book outlines.', array(
':admin-settings' => \Drupal::url('book.settings'),
)) . '</dd>';
$output .= '<dd>' . t('Users with the <em>Add content and child pages to books</em> permission will see a link to <em>Add child page</em> when viewing a content item that is part of a book outline. This link will allow users to create a new content item of the content type you select on the <a href=":admin-settings">Book settings page</a>. By default this is the <em>Book page</em> content type.', array(
':admin-settings' => \Drupal::url('book.settings'),
)) . '</dd>';
$output .= '<dt>' . t('Book navigation') . '</dt>';
$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 href=':admin-block'>Blocks layout page</a>. For book pages to show up in the book navigation, they must be added to a book outline.", array(
':admin-block' => \Drupal::moduleHandler()
->moduleExists('block') ? \Drupal::url('block.admin_display') : '#',
)) . '</dd>';
$output .= '<dt>' . t('Collaboration') . '</dt>';
$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.') . '</dd>';
$output .= '<dt>' . t('Printing books') . '</dt>';
$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>';
$output .= '</dl>';
return $output;
case 'book.admin':
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>';
case 'entity.node.book_outline_form':
return '<p>' . t('The outline feature allows you to include pages in the <a href=":book">Book hierarchy</a>, as well as move them within the hierarchy or to <a href=":book-admin">reorder an entire book</a>.', array(
':book' => \Drupal::url('book.render'),
':book-admin' => \Drupal::url('book.admin'),
)) . '</p>';
}
}