advanced_help_get_tree

Versions
6 – 7
advanced_help_get_tree($topics, $topic_ids, $max_depth = -1, $depth = 0)

Build a tree of advanced help topics.

▾ 3 functions call advanced_help_get_tree()

advanced_help_get_tree in contributions/advanced_help/advanced_help.module
Build a tree of advanced help topics.
advanced_help_index_page in contributions/advanced_help/advanced_help.module
Page callback to view the advanced help topic index.
advanced_help_view_topic in contributions/advanced_help/advanced_help.module
Load and render a help topic.

Code

contributions/advanced_help/advanced_help.module, line 249

<?php
function advanced_help_get_tree($topics, $topic_ids, $max_depth = -1, $depth = 0) {
  uasort($topic_ids, 'advanced_help_uasort');
  $items = array();
  foreach ($topic_ids as $info) {
    list($module, $topic) = $info;
    $item = advanced_help_l($topics[$module][$topic]['title'], "help/$module/$topic");
    if (!empty($topics[$module][$topic]['children']) && ($max_depth == -1 || $depth < $max_depth)) {
      $item .= theme('item_list', advanced_help_get_tree($topics, $topics[$module][$topic]['children'], $max_depth, $depth + 1));
    }

    $items[] = $item;
  }

  return $items;
}
?>

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.