Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Rss.php

function Rss::preRender

Same name in this branch
  1. 11.1.x core/modules/node/src/Plugin/views/row/Rss.php \Drupal\node\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);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal