function book_get_books

cis7 book.module book_get_books()
cle7 book.module book_get_books()
elmsmedia7 book.module book_get_books()
icor7 book.module book_get_books()
meedjum_blog7 book.module book_get_books()
mooc7 book.module book_get_books()

Returns an array of all books.

This list may be used for generating a list of all the books, or for building the options for a form select.

Return value

An array of all books.

9 calls to book_get_books()
book_admin_overview in modules/book/
Returns an administrative overview of all books.
book_block_view in modules/book/book.module
Implements hook_block_view().
book_copy_book_admin_overview in sites/all/modules/elmsln_contrib/book_copy/book_copy.module
Menu callback. Overrides the book_admin_overview at admin/content/book.
book_menu_block_get_menus in sites/all/modules/local_contrib/menu_block/menu_block.module
Implements hook_menu_block_get_menus() on behalf of book.module.
book_render in modules/book/
Menu callback: Prints a listing of all books.

... See full list

3 string references to 'book_get_books'
book_node_delete in modules/book/book.module
Implements hook_node_delete().
_book_update_outline in modules/book/book.module
Handles additions and updates to the book outline.
_dhtml_menu_menus in sites/all/modules/local_contrib/dhtml_menu/
Build a human-readable option list for all non-empty menus. Custom menus and book menus are included if the respective modules are enabled.


modules/book/book.module, line 380
Allows users to create and organize related content in an outline.


function book_get_books() {
  $all_books = &drupal_static(__FUNCTION__);

  if (!isset($all_books)) {
    $all_books = array();
    $nids = db_query("SELECT DISTINCT(bid) FROM {book}")->fetchCol();

    if ($nids) {
      $query = db_select('book', 'b', array('fetch' => PDO::FETCH_ASSOC));
      $query->join('node', 'n', 'b.nid = n.nid');
      $query->join('menu_links', 'ml', 'b.mlid = ml.mlid');
      $query->addField('n', 'type', 'type');
      $query->addField('n', 'title', 'title');
      $query->condition('n.nid', $nids, 'IN');
      $query->condition('n.status', 1);
      $result2 = $query->execute();
      foreach ($result2 as $link) {
        $link['href'] = $link['link_path'];
        $link['options'] = unserialize($link['options']);
        $all_books[$link['bid']] = $link;

  return $all_books;



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.