function Rss::preRender

Same name in this branch
  1. 11.x core/modules/node/src/Plugin/views/row/Rss.php \Drupal\node\Plugin\views\row\Rss::preRender()
Same name and namespace 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. 8.9.x core/modules/node/src/Plugin/views/row/Rss.php \Drupal\node\Plugin\views\row\Rss::preRender()
  4. 8.9.x core/modules/comment/src/Plugin/views/row/Rss.php \Drupal\comment\Plugin\views\row\Rss::preRender()
  5. 10 core/modules/node/src/Plugin/views/row/Rss.php \Drupal\node\Plugin\views\row\Rss::preRender()
  6. 10 core/modules/comment/src/Plugin/views/row/Rss.php \Drupal\comment\Plugin\views\row\Rss::preRender()

Overrides RowPluginBase::preRender

File

core/modules/comment/src/Plugin/views/row/Rss.php, line 51

Class

Rss
Plugin which formats the comments as RSS items.

Namespace

Drupal\comment\Plugin\views\row

Code

public function preRender($result) {
    $cids = [];
    foreach ($result as $row) {
        $cids[] = $row->cid;
    }
    $this->comments = $this->entityTypeManager
        ->getStorage('comment')
        ->loadMultiple($cids);
}

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