public function getObjects(&$obj)
 {
     parent::getObjects($obj);
     $myImage =& $this->getImageObject('image');
     if ($myImage) {
         $obj['images'][$myImage['id']] = $myImage;
     }
 }
 public function &getObj()
 {
     if (!$this->myObj) {
         $obj =& parent::getObj();
         $obj['type'] = 'thumb';
         $obj['title'] = $this->getAttribute('title');
         $obj['text'] = $this->getAttribute('subtitle');
     }
     return $this->myObj;
 }
 protected function styles($style, $element)
 {
     parent::styles($style, $element);
     $element->setAttribute('format', $style->getStyle('formatformat'));
     $element->setAttribute('enablefavourite', $style->getStyle('enablefavourite'));
     $element->setAttribute('titlesize', $style->getStyle('titlesize'));
     $element->setAttribute('titlecolor', $style->getStyle('titlecolor'));
     $element->setAttribute('variable', $style->getStyle('variable'));
     $element->setAttribute('defaultstate', $style->getStyle('defaultstate'));
     $element->setImageAttribute('backgroundimage', $style->getStyle('backgroundimage'));
     $element->setImageAttribute('foregroundimage', $style->getStyle('foregroundimage'));
     $element->setImageAttribute('foregroundimagealternate', $style->getStyle('foregroundimagealternate'));
 }
 /**
  * Get the html node for this element
  * @param AppBuilderAPIDOMDocument $xml
  * @param array $data
  * @return DOMElement
  */
 public function getHTMLNode($xml, &$data)
 {
     $node = parent::getHTMLNode($xml, $data);
     $imageDiv = $xml->createElement('div', array('class' => 'image-container'));
     $imageDiv->appendChild($xml->createImgElement($this->getImageURL('image'), 'image', $this->imageSize));
     $node->appendChild($imageDiv);
     return $node;
 }
コード例 #5
0
 protected function styles($style, $element)
 {
     parent::style($style, $element);
     $element->setAttribute('height', $style->getStyle('height'));
     $element->setAttribute('color', $style->getStyle('color'));
     $element->setAttribute('align', $style->getStyle('align'));
     $element->setAttribute('imagex', $style->getStyle('imagex'));
     $element->setAttribute('imagey', $style->getStyle('imagey'));
     $element->setAttribute('titlex', $style->getStyle('titlex'));
     $element->setAttribute('titley', $style->getStyle('titley'));
     $element->setAttribute('titlesize', $style->getStyle('titlesize'));
     $element->setAttribute('enablefavourite', $style->getStyle('enablefavourite'));
     $element->setImageAttribute('thumbnail', $style->getStyle('thumbnail'));
     $element->setImageAttribute('backgroundimage', $style->getStyle('backgroundimage'));
     $element->setImageAttribute('foregroundimage', $style->getStyle('foregroundimage'));
     $element->setImageAttribute('foregroundimagealternate', $style->getStyle('foregroundimagealternate'));
 }
 /**
  *
  * @param DOMDocument $xml
  * @return DOMElement
  * @deprecated since version 2.0
  */
 public function getNode($xml)
 {
     $node = parent::getNode($xml);
     $contentNode = $xml->createElement('content');
     if (!$this->rawinsert) {
         $contentNode->appendChild($xml->createCDATASection($this->formatHTML($this->html, $this->color)));
     } else {
         $contentNode->appendChild($xml->createCDATASection($this->html));
     }
     $node->appendChild($contentNode);
     return $node;
 }