You are here

public function SarniaViewsHandlerField::render_items in Sarnia 7

Render a list of items.

Parameters

array $items: A flat array of field items. Each value in this array is the output of the ::render_item() method.

Return value

string Rendered content.

File

handlers/handler_field.inc, line 423

Class

SarniaViewsHandlerField
Field handler for displaying Solr fields in Views.

Code

public function render_items($items) {
  $output = '';
  if (!empty($items)) {
    if (!$this->options['is_multivalue']) {
      $output = current($items);
    }
    elseif ($this->options['multivalue']['list_type'] == 'separator') {
      $output = implode(check_plain($this->options['multivalue']['list_separator']), $items);
    }
    else {
      $output = theme('item_list', array(
        'type' => $this->options['multivalue']['list_type'],
        'title' => NULL,
        'items' => $items,
      ));
    }
  }
  return $output;
}