protected function Entry::_setCommentFeedLinks in Zircon Profile 8.0
Same name in this branch
- 8.0 vendor/zendframework/zend-feed/src/Writer/Extension/Threading/Renderer/Entry.php \Zend\Feed\Writer\Extension\Threading\Renderer\Entry::_setCommentFeedLinks()
- 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
- 8 vendor/zendframework/zend-feed/src/Writer/Extension/Threading/Renderer/Entry.php \Zend\Feed\Writer\Extension\Threading\Renderer\Entry::_setCommentFeedLinks()
Set 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/ Threading/ Renderer/ Entry.php - Render entry
File
- vendor/
zendframework/ zend-feed/ src/ Writer/ Extension/ Threading/ Renderer/ Entry.php, line 90
Class
Namespace
Zend\Feed\Writer\Extension\Threading\RendererCode
protected function _setCommentFeedLinks(DOMDocument $dom, DOMElement $root) {
$links = $this
->getDataContainer()
->getCommentFeedLinks();
if (!$links || empty($links)) {
return;
}
foreach ($links as $link) {
$flink = $this->dom
->createElement('link');
$flink
->setAttribute('rel', 'replies');
$flink
->setAttribute('type', 'application/' . $link['type'] . '+xml');
$flink
->setAttribute('href', $link['uri']);
$count = $this
->getDataContainer()
->getCommentCount();
if ($count !== null) {
$flink
->setAttribute('thr:count', $count);
}
$root
->appendChild($flink);
$this->called = true;
}
}