You are here

function hs_book_hierarchical_select_root_level in Hierarchical Select 5.3

Implementation of hook_hierarchical_select_root_level().

File

modules/hs_book.module, line 94
Implementation of the Hierarchical Select API for the Book module.

Code

function hs_book_hierarchical_select_root_level($params) {
  $root_level = array();

  // If the user has permission to create new books, add the top-level book page to the menu;
  if (user_access('create new books')) {
    $root_level[0] = '<' . t('top-level') . '>';
  }
  $root_level += hs_book_hierarchical_select_children(-1, $params);
  return $root_level;
}