Returns an administrative overview of all books.
string A HTML-formatted string with the administrative page content.
public function adminOverview() {
$rows = array();
$headers = array(
t('Book'),
t('Operations'),
);
// Add any recognized books to the table list.
foreach ($this->bookManager
->getAllBooks() as $book) {
$row = array(
l($book['title'], $book['href'], $book['options']),
);
$links = array();
$links['edit'] = array(
'title' => t('Edit order and titles'),
'href' => 'admin/structure/book/' . $book['nid'],
);
$row[] = array(
'data' => array(
'#type' => 'operations',
'#links' => $links,
),
);
$rows[] = $row;
}
$table = array(
'#theme' => 'table',
'#header' => $headers,
'#rows' => $rows,
'#empty' => t('No books available.'),
);
return drupal_render($table);
}