function views_plugin_style_json::render in Views Datasource 7
Same name and namespace in other branches
- 6 views_plugin_style_json.inc \views_plugin_style_json::render()
Implementation of view_style_plugin::render()
Overrides views_plugin_style::render
File
- views/
plugins/ views_plugin_style_json.inc, line 305 - Implements views_plugin_style for views_json
Class
- views_plugin_style_json
- Implements views_plugin_style
Code
function render() {
$view = $this->view;
$options = $this->options;
$field = $view->field;
$rows = array();
foreach ($view->result as $count => $row) {
$view->row_index = $count;
$field_output = _views_json_render_fields($view, $row);
drupal_alter('views_json_render_row', $field_output, $view, $row);
$rows[] = $field_output;
}
unset($view->row_index);
return theme($this
->theme_functions(), array(
'view' => $view,
'options' => $options,
'rows' => $rows,
));
}