You are here

protected function Entry::_setContent in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/zendframework/zend-feed/src/Writer/Extension/Content/Renderer/Entry.php \Zend\Feed\Writer\Extension\Content\Renderer\Entry::_setContent()

Set entry content

Parameters

DOMDocument $dom:

DOMElement $root:

Return value

void

1 call to Entry::_setContent()
Entry::render in vendor/zendframework/zend-feed/src/Writer/Extension/Content/Renderer/Entry.php
Render entry

File

vendor/zendframework/zend-feed/src/Writer/Extension/Content/Renderer/Entry.php, line 63

Class

Entry

Namespace

Zend\Feed\Writer\Extension\Content\Renderer

Code

protected function _setContent(DOMDocument $dom, DOMElement $root) {
  $content = $this
    ->getDataContainer()
    ->getContent();
  if (!$content) {
    return;
  }
  $element = $dom
    ->createElement('content:encoded');
  $root
    ->appendChild($element);
  $cdata = $dom
    ->createCDATASection($content);
  $element
    ->appendChild($cdata);
  $this->called = true;
}