function views_handler_field_content::render in Content Construction Kit (CCK) 6
1 call to views_handler_field_content::render()
1 method overrides views_handler_field_content::render()
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);
}