function views_plugin_style::render_fields in Views (for Drupal 7) 6.2
Same name and namespace in other branches
- 6.3 plugins/views_plugin_style.inc \views_plugin_style::render_fields()
- 7.3 plugins/views_plugin_style.inc \views_plugin_style::render_fields()
Render all of the fields for a given style and store them on the object.
Parameters
$result: The result array from $view->result
2 calls to views_plugin_style::render_fields()
- views_plugin_style::get_field in plugins/
views_plugin_style.inc - Get a rendered field.
- views_plugin_style::render_grouping in plugins/
views_plugin_style.inc - Group records as needed for rendering.
File
- plugins/
views_plugin_style.inc, line 207
Class
- views_plugin_style
- Base class to define a style plugin handler.
Code
function render_fields($result) {
if (!$this
->uses_fields()) {
return;
}
if (isset($this->rendered_fields)) {
return $this->rendered_fields;
}
$this->view->row_index = 0;
$keys = array_keys($this->view->field);
foreach ($result as $count => $row) {
$this->view->row_index = $count;
foreach ($keys as $id) {
$this->rendered_fields[$count][$id] = $this->view->field[$id]
->theme($row);
}
}
unset($this->view->row_index);
}