You are here

protected function Rss::getChannelElements in Podcast (using Views) 8

Return an array of additional XHTML elements to add to the channel.

Return value

A render array.

Overrides Rss::getChannelElements

File

src/Plugin/views/style/Rss.php, line 205

Class

Rss
Default style plugin to render an RSS feed.

Namespace

Drupal\podcast\Plugin\views\style

Code

protected function getChannelElements() {
  $channel_elements = parent::getChannelElements();
  $namespaces = is_array($this->namespaces) ? $this->namespaces : [];
  $this->namespaces = array_merge($namespaces, [
    'xmlns:itunes' => 'http://www.itunes.com/dtds/podcast-1.0.dtd',
    'xmlns:content' => 'http://purl.org/rss/1.0/modules/content/',
    'xmlns:atom' => 'http://www.w3.org/2005/Atom',
  ]);
  return $channel_elements;
}