function chado_wrapper_render_items

1.x chado_wrapper_functions.inc chado_wrapper_render_items($handler, $values)
8 calls to chado_wrapper_render_items()
chado_views_handler_field::render in tripal_views/views/handlers/chado_views_handler_field.inc
Render the field.
chado_views_handler_field_boolean::render in tripal_views/views/handlers/chado_views_handler_field_boolean.inc
Render the field.
chado_views_handler_field_counter::render in tripal_views/views/handlers/chado_views_handler_field_counter.inc
Render the field.
chado_views_handler_field_custom::render in tripal_views/views/handlers/chado_views_handler_field_custom.inc
Render the field.
chado_views_handler_field_date::render in tripal_views/views/handlers/chado_views_handler_field_date.inc
Render the field.

... See full list

File

tripal_views/views/handlers/chado_wrapper_functions.inc, line 87
TODO: add documentation

Code

function chado_wrapper_render_items($handler, $values) {

  // If it's aggregated (an array), then render each part
  // using the parent render functionality
  if ($handler->aggregated) {

    $items = array();

    $parts = $values->{$handler->field_alias};
    foreach ($parts as $p) {
      $v[$handler->field_alias] = $p;
      $val = (object) $v;
      $items[] = $handler->parent_render($val);
      unset($v, $val);
    }

    if ($handler->options['type'] == 'separator') {
      return implode(check_plain($handler->options['separator']), $items);
    }
    else {
      return theme('item_list', $items, NULL, $handler->options['type']);
    }

    // Otherwise it is not aggragated
    // Just render like the default handler would
  }
  else {
    return $handler->parent_render($values);
  }
}