template_preprocess_book_all_books_block
function template_preprocess_book_all_books_block
template_preprocess_book_all_books_block(&$variables)
Processes variables for book-all-books-block.tpl.php.
All non-renderable elements are removed so that the template has full access to the structured data but can also simply iterate over all elements and render them (as in the default template).
Parameters
$variables: An associative array containing the following key:
- book_menus
See also
File
- modules/book/book.module, line 1074
- Allows users to create and organize related content in an outline.
Code
function template_preprocess_book_all_books_block(&$variables) { // Remove all non-renderable elements. $elements = $variables['book_menus']; $variables['book_menus'] = array(); foreach (element_children($elements) as $index) { $variables['book_menus'][$index] = $elements[$index]; } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!book!book.module/function/template_preprocess_book_all_books_block/7.x