You are here

function views_plugin_style_rss_fields::map_rows in Views RSS 6

Same name and namespace in other branches
  1. 7 views/views_plugin_style_rss_fields.inc \views_plugin_style_rss_fields::map_rows()

Map views row result to an RSS item.

File

views/views_plugin_style_rss_fields.inc, line 202

Class

views_plugin_style_rss_fields
Extend the view_plugin_style class to provide an RSS view style.

Code

function map_rows($rows) {

  // Fields must be rendered in order as of Views 2.3, so we will pre-render everything.
  $renders = array();
  $keys = array_keys($this->view->field);
  foreach ($rows as $count => $row) {
    foreach ($keys as $id) {
      $renders[$count][$id] = $this->view->field[$id]
        ->theme($row);
    }
  }
  $items = $this
    ->process_fields($renders);
  return $items;
}