You are here

function views_handler_field_content::render in Content Construction Kit (CCK) 6

1 call to views_handler_field_content::render()
views_handler_field_content_multiple::render in includes/content.views.inc
1 method overrides views_handler_field_content::render()
views_handler_field_content_multiple::render in includes/content.views.inc

File

includes/content.views.inc, line 315

Class

views_handler_field_content
The subclass adds basic field and formatter info, for field-specific subclasses to use if they need to.

Code

function render($values) {
  $field = $this->content_field;
  $options = $this->options;
  $db_info = content_database_info($field);

  // $values will be used as a fake $node object;
  // we provide a build_mode for rendering.
  // TODO : we can stick any value in there -
  // what would make most sense ?  row_style ?
  $values->build_mode = 'views';
  $item = array();
  foreach ($db_info['columns'] as $column => $attributes) {
    $item[$column] = $values->{$this->table_alias . '_' . $attributes['column']};
  }
  return content_format($field, $item, $options['format'], $values);
}