/** * 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); $node->appendChild($xml->createElement('div', array('class' => 'title', 'text' => $this->getAttribute('title')))); $node->appendChild($xml->createElement('div', array('class' => 'text', 'text' => $this->getAttribute('subtitle')))); return $node; }
/** * 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); if ($this->hasAttribute('thumbnail')) { $node->appendChild($xml->createImgElement($this->getImageURL('thumbnail'), 'icon', $this->imageSize)); } $node->appendChild($xml->createElement('div', array('class' => 'text', 'text' => $this->getAttribute('title')))); return $node; }
/** * Get the html node for this element * @param AppBuilderAPIDOMDocument $xml * @param array $data * @return DOMElement */ public function getHTMLNode($xml, &$data, $link = false) { if (!$this->node || !$link) { $s = isset($data['settings']['currentscreen']) ? $data['settings']['currentscreen'] : null; $data['settings']['currentscreen'] = false; $this->node = parent::getHTMLNode($xml, $data); $data['settings']['currentscreen'] = $s; $this->node->appendChild($inner = $xml->createElement('div', 'tab-inner')); $inner->appendChild($xml->createElement('div', array('class' => 'label', 'text' => $this->title))); $inner->appendChild($xml->createImgElement($this->imgURL, 'icon')); } return $this->node; }
/** * 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); $node->setAttribute('data-latitude', $this->getAttribute('latitude')); $node->setAttribute('data-longitude', $this->getAttribute('longitude')); $node->appendChild($xml->createElement('div', array('class' => 'title', 'text' => $this->getAttribute('title')))); $subtitle = $this->getAttribute('subtitle'); if (empty($subtitle)) { $xml->addClass($node, 'no-subtitle'); } else { $node->appendChild($xml->createElement('div', array('class' => 'text', 'text' => $this->getAttribute('subtitle')))); } return $node; }
/** * 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); $node->appendChild($htmlNode = $xml->createElement('div', 'html')); $html = $this->html; if ($html != '') { $fragDoc = new DOMDocument(); @$fragDoc->loadHTML('<?xml version="1.0" encoding="utf-8" standalone="yes"?><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/ loose.dtd"><html><head><title></title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>' . $html . '</body></html>'); if ($fragDoc->hasChildNodes()) { $body = $fragDoc->getElementsByTagName('body')->item(0); if ($body->hasChildNodes()) { for ($i = 0; $i < $body->childNodes->length; $i++) { $iNode = $body->childNodes->item($i); $importedNode = $xml->importNode($iNode, true); $htmlNode->appendChild($importedNode); } $this->checkNode($xml, $htmlNode); } } } return $node; }
/** * 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); $node->appendChild($xml->createImgElement($this->getImageURL('image'), 'image', $this->imageSize)); return $node; }
/** * 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; }
/** * 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); $node->appendChild($this->getInner($xml, $data)); return $node; }