function views_plugin_style_atom_fields::map_rows in Views Atom 6
Same name and namespace in other branches
- 7 views_plugin_style_atom_fields.inc \views_plugin_style_atom_fields::map_rows()
File
- views/
views_plugin_style_atom_fields.inc, line 193 - Style plugin for a standard Atom feed.
Class
- views_plugin_style_atom_fields
- @file Style plugin for a standard Atom feed.
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 = array();
foreach ($renders as $id => $row) {
$item = array();
foreach ($this->options['fields'] as $key => $val) {
if (!isset($this->view->field[$val])) {
continue;
}
$item[$key] = htmlentities($row[$val], ENT_QUOTES, '', FALSE);
}
$items[] = $item;
}
return $items;
}