function theme_taxonomy_manager_tree_elements in Taxonomy Manager 7
Same name and namespace in other branches
- 5 taxonomy_manager.module \theme_taxonomy_manager_tree_elements()
- 6.2 taxonomy_manager.module \theme_taxonomy_manager_tree_elements()
- 6 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 1024 - Taxonomy Manager
Code
function theme_taxonomy_manager_tree_elements($variables) {
$element = $variables['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 (is_array($element[$tid]['#attributes']['class']) && in_array('has-children', $element[$tid]['#attributes']['class']) || isset($element[$tid]['children']) && is_array($element[$tid]['children'])) {
$output .= '<div class="hitArea"></div>';
}
$output .= '<div class="term-line' . ($element[$tid]['checkbox']['#highlight'] ? ' highlightActiveTerm' : '') . '">';
$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']);
}
$output .= '</div>';
// Siblings Pager.
if (isset($element[$tid]['next_count'])) {
$output .= '<div class="term-has-more-siblings">';
$output .= '<div class="term-next-count">' . t('next') . " " . drupal_render($element[$tid]['next_count']) . '</div>';
$output .= drupal_render($element[$tid]['page']);
$output .= '</div>';
}
if (isset($element[$tid]['children']) && is_array($element[$tid]['children'])) {
$output .= theme('taxonomy_manager_tree_elements', array(
'element' => $element[$tid]['children'],
));
}
$output .= '</li>';
}
}
}
$output .= "</ul>";
if (isset($element['language'])) {
$output .= drupal_render($element['language']);
}
return $output;
}