public function Rss::render in Zircon Profile 8
Same name in this branch
- 8 vendor/zendframework/zend-feed/src/Writer/Renderer/Entry/Rss.php \Zend\Feed\Writer\Renderer\Entry\Rss::render()
- 8 vendor/zendframework/zend-feed/src/Writer/Renderer/Feed/Rss.php \Zend\Feed\Writer\Renderer\Feed\Rss::render()
- 8 core/modules/views/src/Plugin/views/style/Rss.php \Drupal\views\Plugin\views\style\Rss::render()
- 8 core/modules/node/src/Plugin/views/row/Rss.php \Drupal\node\Plugin\views\row\Rss::render()
- 8 core/modules/comment/src/Plugin/views/row/Rss.php \Drupal\comment\Plugin\views\row\Rss::render()
- 8 core/modules/aggregator/src/Plugin/views/row/Rss.php \Drupal\aggregator\Plugin\views\row\Rss::render()
Same name and namespace in other branches
- 8.0 core/modules/views/src/Plugin/views/style/Rss.php \Drupal\views\Plugin\views\style\Rss::render()
Render the display in this style.
Overrides StylePluginBase::render
File
- core/
modules/ views/ src/ Plugin/ views/ style/ Rss.php, line 106 - Contains \Drupal\views\Plugin\views\style\Rss.
Class
- Rss
- Default style plugin to render an RSS feed.
Namespace
Drupal\views\Plugin\views\styleCode
public function render() {
if (empty($this->view->rowPlugin)) {
debug('Drupal\\views\\Plugin\\views\\style\\Rss: Missing row plugin');
return array();
}
$rows = [];
// This will be filled in by the row plugin and is used later on in the
// theming output.
$this->namespaces = array(
'xmlns:dc' => 'http://purl.org/dc/elements/1.1/',
);
// Fetch any additional elements for the channel and merge in their
// namespaces.
$this->channel_elements = $this
->getChannelElements();
foreach ($this->channel_elements as $element) {
if (isset($element['namespace'])) {
$this->namespaces = array_merge($this->namespaces, $element['namespace']);
}
}
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;
}