You are here

function views_customfield_handler_field_phpcode::render_row in Views Custom Field 6

Enter description here...

Parameters

stdClass $values:

Return value

string

1 call to views_customfield_handler_field_phpcode::render_row()
views_customfield_handler_field_phpcode::pre_render in includes/views_customfield_handler_field_phpcode.inc

File

includes/views_customfield_handler_field_phpcode.inc, line 141
Contains the 'customfield' phpcode field handler.

Class

views_customfield_handler_field_phpcode

Code

function render_row($values) {
  $d = $this->view->display[$this->view->current_display];
  $field_handlers = $d->handler->handlers['field'];
  foreach ($field_handlers as $h) {

    // Handle grouped fields
    if (is_a($h, 'content_handler_field_multiple') && $h->defer_query) {

      // content_handler_field_multiple stores its query results in $obj->field_values
      $tmp = array();
      if (!empty($h->field_values[$values->{$h->field_alias}])) {
        foreach ($h->field_values[$values->{$h->field_alias}] as $k => $v) {
          $tmp[$k] = $v;

          // clean up a bit
          unset($tmp[$k]['#delta']);
          unset($tmp[$k]['_nid']);
        }
      }
      $values->{$h->table . '_' . $h->field} = $tmp;
    }
  }
  return $this
    ->render_phpcode($this->options['value'], $this->static, $values);
}