public function RssFields::render in Views RSS 8.2
Same name in this branch
- 8.2 src/Plugin/views/style/RssFields.php \Drupal\views_rss\Plugin\views\style\RssFields::render()
- 8.2 src/Plugin/views/row/RssFields.php \Drupal\views_rss\Plugin\views\row\RssFields::render()
Same name and namespace in other branches
- 8.3 src/Plugin/views/style/RssFields.php \Drupal\views_rss\Plugin\views\style\RssFields::render()
Render the display in this style.
Overrides StylePluginBase::render
File
- src/
Plugin/ views/ style/ RssFields.php, line 446
Class
- RssFields
- Default style plugin to render an RSS feed from fields.
Namespace
Drupal\views_rss\Plugin\views\styleCode
public function render() {
$rows = '';
$this->namespaces = $this
->getNamespaces();
// Fetch any additional elements for the channel and merge in their
// namespaces.
$this->channel_elements = $this
->getChannelElements();
$rows = array();
foreach ($this->view->result as $row_index => $row) {
$this->view->row_index = $row_index;
$rows[] = $this->view->rowPlugin
->render($row);
}
$build = array(
'#theme' => $this
->themeFunctions(),
'#view' => $this->view,
'#options' => $this->options,
'#rows' => $rows,
);
unset($this->view->row_index);
return $build;
}