function Rss::preRender

Same name in this branch
  1. 9 core/modules/node/src/Plugin/views/row/Rss.php \Drupal\node\Plugin\views\row\Rss::preRender()
Same name in other branches
  1. 8.9.x core/modules/node/src/Plugin/views/row/Rss.php \Drupal\node\Plugin\views\row\Rss::preRender()
  2. 8.9.x 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/comment/src/Plugin/views/row/Rss.php, line 42

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.