You are here

protected function AbstractAtom::_setImage in Zircon Profile 8

Same name in this branch
  1. 8 vendor/zendframework/zend-feed/src/Writer/Renderer/Feed/AbstractAtom.php \Zend\Feed\Writer\Renderer\Feed\AbstractAtom::_setImage()
  2. 8 vendor/zendframework/zend-feed/src/Writer/Renderer/Feed/Atom/AbstractAtom.php \Zend\Feed\Writer\Renderer\Feed\Atom\AbstractAtom::_setImage()
Same name and namespace in other branches
  1. 8.0 vendor/zendframework/zend-feed/src/Writer/Renderer/Feed/AbstractAtom.php \Zend\Feed\Writer\Renderer\Feed\AbstractAtom::_setImage()

Set feed level logo (image)

Parameters

DOMDocument $dom:

DOMElement $root:

Return value

void

1 call to AbstractAtom::_setImage()
Atom::render in vendor/zendframework/zend-feed/src/Writer/Renderer/Feed/Atom.php
Render Atom feed

File

vendor/zendframework/zend-feed/src/Writer/Renderer/Feed/AbstractAtom.php, line 308

Class

AbstractAtom

Namespace

Zend\Feed\Writer\Renderer\Feed

Code

protected function _setImage(DOMDocument $dom, DOMElement $root) {
  $image = $this
    ->getDataContainer()
    ->getImage();
  if (!$image) {
    return;
  }
  $img = $dom
    ->createElement('logo');
  $root
    ->appendChild($img);
  $text = $dom
    ->createTextNode($image['uri']);
  $img
    ->appendChild($text);
}