You are here

protected function AbstractAtom::_setImage in Zircon Profile 8.0

Same name in this branch
  1. 8.0 vendor/zendframework/zend-feed/src/Writer/Renderer/Feed/AbstractAtom.php \Zend\Feed\Writer\Renderer\Feed\AbstractAtom::_setImage()
  2. 8.0 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 vendor/zendframework/zend-feed/src/Writer/Renderer/Feed/Atom/AbstractAtom.php \Zend\Feed\Writer\Renderer\Feed\Atom\AbstractAtom::_setImage()

Set feed level logo (image)

Parameters

DOMDocument $dom:

DOMElement $root:

Return value

void

File

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

Class

AbstractAtom

Namespace

Zend\Feed\Writer\Renderer\Feed\Atom

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);
}