You are here

function book_render in Drupal 7

Same name and namespace in other branches
  1. 4 modules/book.module \book_render()
  2. 5 modules/book/book.module \book_render()
  3. 6 modules/book/book.pages.inc \book_render()

Menu callback: Prints a listing of all books.

Return value

string A HTML-formatted string with the listing of all books content.

See also

book_menu()

1 string reference to 'book_render'
book_menu in modules/book/book.module
Implements hook_menu().

File

modules/book/book.pages.inc, line 16
User page callbacks for the book module.

Code

function book_render() {
  $book_list = array();
  foreach (book_get_books() as $book) {
    $book_list[] = l($book['title'], $book['href'], $book['options']);
  }
  return theme('item_list', array(
    'items' => $book_list,
  ));
}