You are here

public function Rss::preRender in Zircon Profile 8

Same name in this branch
  1. 8 core/modules/node/src/Plugin/views/row/Rss.php \Drupal\node\Plugin\views\row\Rss::preRender()
  2. 8 core/modules/comment/src/Plugin/views/row/Rss.php \Drupal\comment\Plugin\views\row\Rss::preRender()
Same name and namespace in other branches
  1. 8.0 core/modules/node/src/Plugin/views/row/Rss.php \Drupal\node\Plugin\views\row\Rss::preRender()

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

Parameters

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

Overrides RowPluginBase::preRender

File

core/modules/node/src/Plugin/views/row/Rss.php, line 81
Contains \Drupal\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

Drupal\node\Plugin\views\row

Code

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