You are here

protected function Rss::_setCommentLink in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/zendframework/zend-feed/src/Writer/Renderer/Entry/Rss.php \Zend\Feed\Writer\Renderer\Entry\Rss::_setCommentLink()

Set link to entry comments

Parameters

DOMDocument $dom:

DOMElement $root:

Return value

void

1 call to Rss::_setCommentLink()
Rss::render in vendor/zendframework/zend-feed/src/Writer/Renderer/Entry/Rss.php
Render RSS entry

File

vendor/zendframework/zend-feed/src/Writer/Renderer/Entry/Rss.php, line 294

Class

Rss

Namespace

Zend\Feed\Writer\Renderer\Entry

Code

protected function _setCommentLink(DOMDocument $dom, DOMElement $root) {
  $link = $this
    ->getDataContainer()
    ->getCommentLink();
  if (!$link) {
    return;
  }
  $clink = $this->dom
    ->createElement('comments');
  $text = $dom
    ->createTextNode($link);
  $clink
    ->appendChild($text);
  $root
    ->appendChild($clink);
}