Ejemplo n.º 1
0
 /**
  * @param $blockId
  * @param BlockXML $blockXML
  * @return BlockXML
  */
 public function saveBlockConfig($blockId, \Fraym\Block\BlockXML $blockXML)
 {
     $blockConfig = $this->request->getGPAsObject();
     $customProperties = new \Fraym\Block\BlockXMLDom();
     foreach ($blockConfig->html as $localeId => $content) {
         $element = $customProperties->createElement('html');
         $domAttribute = $customProperties->createAttribute('locale');
         $domAttribute->value = $localeId;
         $element->appendChild($domAttribute);
         $element->appendChild($customProperties->createCDATASection($content));
         $customProperties->appendChild($element);
     }
     $blockXML->setCustomProperty($customProperties);
     return $blockXML;
 }