You are here

function theme_taxonomy_manager_tree_elements in Taxonomy Manager 6.2

Same name and namespace in other branches
  1. 5 taxonomy_manager.module \theme_taxonomy_manager_tree_elements()
  2. 6 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 1021
Taxonomy Manager

Code

function theme_taxonomy_manager_tree_elements($element) {
  $output .= '<ul class="treeview">';
  if (is_array($element)) {
    foreach (element_children($element) as $tid) {
      if (is_numeric($tid)) {
        $output .= '<li' . drupal_attributes($element[$tid]['#attributes']) . '>';
        if (strpos($element[$tid]['#attributes']['class'], 'has-children') !== FALSE || is_array($element[$tid]['children'])) {
          $output .= '<div class="hitArea"></div>';
        }
        $output .= '<div class="term-line">';
        $output .= drupal_render($element[$tid]['checkbox']);
        $output .= '<div class="term-operations" style="display: none;">';
        $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']);
        }
        $output .= '</li>';
      }
    }
  }
  $output .= "</ul>";
  if (isset($element['language'])) {
    $output .= drupal_render($element['language']);
  }
  return $output;
}