You are here

function Rss::pre_render in Views (for Drupal 7) 8.3

Same name in this branch
  1. 8.3 lib/Views/node/Plugin/views/row/Rss.php \Views\node\Plugin\views\row\Rss::pre_render()
  2. 8.3 lib/Views/comment/Plugin/views/row/Rss.php \Views\comment\Plugin\views\row\Rss::pre_render()

Allow the style to do stuff before each row is rendered.

Parameters

$result: The full array of results from the query.

Overrides RowPluginBase::pre_render

File

lib/Views/node/Plugin/views/row/Rss.php, line 84
Definition of Views\node\Plugin\views\row\Rss.

Class

Rss
Plugin which performs a node_view on the resulting object and formats it as an RSS item.

Namespace

Views\node\Plugin\views\row

Code

function pre_render($values) {
  $nids = array();
  foreach ($values as $row) {
    $nids[] = $row->{$this->field_alias};
  }
  if (!empty($nids)) {
    $this->nodes = node_load_multiple($nids);
  }
}