You are here

protected function Atom::_setLink in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/zendframework/zend-feed/src/Writer/Renderer/Entry/Atom.php \Zend\Feed\Writer\Renderer\Entry\Atom::_setLink()
1 call to Atom::_setLink()
Atom::render in vendor/zendframework/zend-feed/src/Writer/Renderer/Entry/Atom.php
Render atom entry

File

vendor/zendframework/zend-feed/src/Writer/Renderer/Entry/Atom.php, line 229

Class

Atom

Namespace

Zend\Feed\Writer\Renderer\Entry

Code

protected function _setLink(DOMDocument $dom, DOMElement $root) {
  if (!$this
    ->getDataContainer()
    ->getLink()) {
    return;
  }
  $link = $dom
    ->createElement('link');
  $root
    ->appendChild($link);
  $link
    ->setAttribute('rel', 'alternate');
  $link
    ->setAttribute('type', 'text/html');
  $link
    ->setAttribute('href', $this
    ->getDataContainer()
    ->getLink());
}