You are here

function theme_taxonomy_manager_term_data_extra in Taxonomy Manager 7

Same name and namespace in other branches
  1. 6.2 taxonomy_manager.admin.inc \theme_taxonomy_manager_term_data_extra()
  2. 6 taxonomy_manager.admin.inc \theme_taxonomy_manager_term_data_extra()

File

./taxonomy_manager.admin.inc, line 2957

Code

function theme_taxonomy_manager_term_data_extra($variables) {
  $element = $variables['element'];
  $rows = array();
  $headers = array();
  foreach (element_children($element['headers']) as $key) {
    if (is_array($element['headers'][$key])) {
      $headers[] = drupal_render($element['headers'][$key]);
    }
  }
  foreach (element_children($element['data']) as $tid) {
    $row = array();
    foreach (element_children($element['data'][$tid]) as $key) {
      if (is_array($element['data'][$tid][$key])) {
        $row[] = array(
          'data' => drupal_render($element['data'][$tid][$key]) . drupal_render($element['data'][$tid][$key]['tid']),
          'class' => isset($element['data'][$tid][$key]['#row-class']) ? $element['data'][$tid][$key]['#row-class'] : '',
        );
      }
    }
    $rows[] = $row;
  }
  $row = array();
  foreach (element_children($element['op']) as $key) {
    if (is_array($element['op'][$key])) {

      //$row[] = drupal_render($element['op'][$key]);
      $row[] = array(
        'data' => drupal_render($element['op'][$key]),
        'class' => isset($element['op'][$key]['#row-class']) ? $element['op'][$key]['#row-class'] : '',
      );
    }
  }
  $rows[] = $row;
  return theme('table', array(
    'header' => $headers,
    'rows' => $rows,
  ));
}