protected function Entry::_setCommentLink in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/zendframework/zend-feed/src/Writer/Extension/Threading/Renderer/Entry.php \Zend\Feed\Writer\Extension\Threading\Renderer\Entry::_setCommentLink()
Set comment link
Parameters
DOMDocument $dom:
DOMElement $root:
Return value
void
1 call to Entry::_setCommentLink()
- Entry::render in vendor/
zendframework/ zend-feed/ src/ Writer/ Extension/ Threading/ Renderer/ Entry.php - Render entry
File
- vendor/
zendframework/ zend-feed/ src/ Writer/ Extension/ Threading/ Renderer/ Entry.php, line 65
Class
Namespace
Zend\Feed\Writer\Extension\Threading\RendererCode
protected function _setCommentLink(DOMDocument $dom, DOMElement $root) {
$link = $this
->getDataContainer()
->getCommentLink();
if (!$link) {
return;
}
$clink = $this->dom
->createElement('link');
$clink
->setAttribute('rel', 'replies');
$clink
->setAttribute('type', 'text/html');
$clink
->setAttribute('href', $link);
$count = $this
->getDataContainer()
->getCommentCount();
if ($count !== null) {
$clink
->setAttribute('thr:count', $count);
}
$root
->appendChild($clink);
$this->called = true;
}