You are here

protected function Entry::_setCommentFeedLinks in Zircon Profile 8.0

Same name in this branch
  1. 8.0 vendor/zendframework/zend-feed/src/Writer/Extension/Threading/Renderer/Entry.php \Zend\Feed\Writer\Extension\Threading\Renderer\Entry::_setCommentFeedLinks()
  2. 8.0 vendor/zendframework/zend-feed/src/Writer/Extension/WellFormedWeb/Renderer/Entry.php \Zend\Feed\Writer\Extension\WellFormedWeb\Renderer\Entry::_setCommentFeedLinks()
Same name and namespace in other branches
  1. 8 vendor/zendframework/zend-feed/src/Writer/Extension/WellFormedWeb/Renderer/Entry.php \Zend\Feed\Writer\Extension\WellFormedWeb\Renderer\Entry::_setCommentFeedLinks()

Set entry comment feed links

Parameters

DOMDocument $dom:

DOMElement $root:

Return value

void

1 call to Entry::_setCommentFeedLinks()
Entry::render in vendor/zendframework/zend-feed/src/Writer/Extension/WellFormedWeb/Renderer/Entry.php
Render entry

File

vendor/zendframework/zend-feed/src/Writer/Extension/WellFormedWeb/Renderer/Entry.php, line 63

Class

Entry

Namespace

Zend\Feed\Writer\Extension\WellFormedWeb\Renderer

Code

protected function _setCommentFeedLinks(DOMDocument $dom, DOMElement $root) {
  $links = $this
    ->getDataContainer()
    ->getCommentFeedLinks();
  if (!$links || empty($links)) {
    return;
  }
  foreach ($links as $link) {
    if ($link['type'] == 'rss') {
      $flink = $this->dom
        ->createElement('wfw:commentRss');
      $text = $dom
        ->createTextNode($link['uri']);
      $flink
        ->appendChild($text);
      $root
        ->appendChild($flink);
    }
  }
  $this->called = true;
}