You are here

function theme_taxonomy_manager_tree_elements in Taxonomy Manager 6

Same name and namespace in other branches
  1. 5 taxonomy_manager.module \theme_taxonomy_manager_tree_elements()
  2. 6.2 taxonomy_manager.module \theme_taxonomy_manager_tree_elements()
  3. 7 taxonomy_manager.module \theme_taxonomy_manager_tree_elements()

recursive theme function for term elements

Parameters

$element:

Return value

html lists

1 theme call to theme_taxonomy_manager_tree_elements()
theme_taxonomy_manager_tree in ./taxonomy_manager.module
theme function for root element

File

./taxonomy_manager.module, line 841
Taxonomy Manager

Code

function theme_taxonomy_manager_tree_elements($element) {
  $output .= "<ul>";
  if (is_array($element)) {
    foreach (element_children($element) as $tid) {
      if (is_numeric($tid)) {
        $output .= '<li' . drupal_attributes($element[$tid]['#attributes']) . '>';
        $output .= '<div class="term-line">';
        $output .= '<div class="term-item">';
        $output .= drupal_render($element[$tid]['checkbox']);
        $output .= '</div>';
        $output .= '<div class="term-operations">';
        $output .= drupal_render($element[$tid]['operations']);
        $output .= '</div>';
        if (is_array($element[$tid]['weight']) && is_array($element[$tid]['tid'])) {
          $output .= drupal_render($element[$tid]['weight']);
          $output .= drupal_render($element[$tid]['tid']);
        }
        if (is_array($element[$tid]['has-more-siblings'])) {
          $output .= '<div class="term-has-more-siblings">';
          $output .= '<div class="term-next-count">next ' . drupal_render($element[$tid]['next_count']) . '</div>';
          $output .= '<div class="term-downarrow-img">';
          $output .= drupal_render($element[$tid]['has-more-siblings']);
          $output .= drupal_render($element[$tid]['page']);
          $output .= '</div><div class="clear"></div></div>';
        }
        $output .= '</div>';
        if (is_array($element[$tid]['children'])) {
          $output .= theme('taxonomy_manager_tree_elements', $element[$tid]['children']);
        }
        if (strstr($element[$tid]['#attributes']['class'], 'has-children')) {
          $output .= "<ul><li></li></ul>";
        }
        $output .= '</li>';
      }
    }
  }
  $output .= "</ul>";
  return $output;
}