function Rss::preRender

Same name in this branch
  1. 8.9.x core/modules/comment/src/Plugin/views/row/Rss.php \Drupal\comment\Plugin\views\row\Rss::preRender()
Same name in other branches
  1. 9 core/modules/node/src/Plugin/views/row/Rss.php \Drupal\node\Plugin\views\row\Rss::preRender()
  2. 9 core/modules/comment/src/Plugin/views/row/Rss.php \Drupal\comment\Plugin\views\row\Rss::preRender()
  3. 10 core/modules/node/src/Plugin/views/row/Rss.php \Drupal\node\Plugin\views\row\Rss::preRender()
  4. 10 core/modules/comment/src/Plugin/views/row/Rss.php \Drupal\comment\Plugin\views\row\Rss::preRender()
  5. 11.x core/modules/node/src/Plugin/views/row/Rss.php \Drupal\node\Plugin\views\row\Rss::preRender()
  6. 11.x core/modules/comment/src/Plugin/views/row/Rss.php \Drupal\comment\Plugin\views\row\Rss::preRender()

Overrides RowPluginBase::preRender

File

core/modules/node/src/Plugin/views/row/Rss.php, line 79

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 = [];
    foreach ($values as $row) {
        $nids[] = $row->{$this->field_alias};
    }
    if (!empty($nids)) {
        $this->nodes = $this->nodeStorage
            ->loadMultiple($nids);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.