Esempio n. 1
0
 /**
  *
  * @param \DOMElement $items
  * @param \AppShed\Remote\XML\DOMDocument $xml
  * @param \AppShed\Remote\HTML\Settings $settings
  * @param \AppShed\Remote\Style\CSSDocument $css
  * @param array $javascripts
  *
  * @return \AppShed\Remote\Element\Item\Item[] of header items
  */
 protected function addHTMLChildren($items, $xml, $settings, $css, &$javascripts)
 {
     $items->appendChild($itemsInner = $xml->createElement('div', 'items-inner'));
     $itemsInner->appendChild($table = $xml->createElement('table'));
     $table->appendChild($row = $xml->createElement('tr'));
     $settings->pushCurrentScreen($this->getId());
     $i = 0;
     $headButtons = [];
     foreach ($this->children as $child) {
         if ($child->getHeaderItem()) {
             $headButtons[] = $child;
         } else {
             $childNode = $child->getHTMLNode($xml, $settings);
             if ($childNode) {
                 if ($i == $this->columns) {
                     $table->appendChild($row = $xml->createElement('tr'));
                     $i = 0;
                 }
                 $i++;
                 $row->appendChild($childNode);
             }
             $child->getCSS($css, $settings);
             $child->getJavascript($javascripts, $settings);
         }
     }
     while ($i < $this->columns) {
         $row->appendChild($xml->createElement('td'));
         $i++;
     }
     $settings->popCurrentScreen();
     return $headButtons;
 }
 /**
  * Get the html node for this element
  *
  * @param \DOMElement $node
  * @param \AppShed\Remote\XML\DOMDocument $xml
  * @param \AppShed\Remote\HTML\Settings $settings
  */
 protected function getHTMLNodeInner($node, $xml, $settings)
 {
     $imageDiv = $xml->createElement('div', ['class' => 'image-container']);
     $imageDiv->appendChild($xml->createImgElement($this->thumbImage->getUrl(), 'image'));
     $node->appendChild($imageDiv);
     $this->applyLinkToNode($xml, $node, $settings);
 }
Esempio n. 3
0
 /**
  * Get the html node for this element
  *
  * @param \DOMElement $node
  * @param \AppShed\Remote\XML\DOMDocument $xml
  * @param \AppShed\Remote\HTML\Settings $settings
  */
 protected function getHTMLNodeInner($node, $xml, $settings)
 {
     $node->appendChild($inner = $xml->createElement('div', 'item-icon-inner'));
     $inner->appendChild($xml->createImgElement($this->icon->getUrl(), 'image', $this->icon->getSize()));
     $inner->appendChild($xml->createElement('div', ['class' => 'title', 'text' => $this->title]));
     $this->applyLinkToNode($xml, $node, $settings);
 }
Esempio n. 4
0
 /**
  * Get the html node for this element
  *
  * @param \DOMElement $node
  * @param \AppShed\Remote\XML\DOMDocument $xml
  * @param \AppShed\Remote\HTML\Settings $settings
  */
 protected function getHTMLNodeInner($node, $xml, $settings)
 {
     if (!empty($this->title)) {
         $node->appendChild($xml->createElement('div', ['class' => 'title', 'text' => $this->title]));
     }
     $node->appendChild($inner = $xml->createElement('div', 'textarea-container' . (empty($this->title) ? ' no-title' : '')));
     $inner->appendChild($xml->createElement('textarea', ['class' => 'textarea', 'name' => $this->variableName, 'text' => $this->value, 'data-variable' => $this->variableName, 'data-save-value' => $this->save]));
 }
Esempio n. 5
0
 /**
  * Get the html node for this element
  *
  * @param \DOMElement $node
  * @param \AppShed\Remote\XML\DOMDocument $xml
  * @param \AppShed\Remote\HTML\Settings $settings
  */
 protected function getHTMLNodeInner($node, $xml, $settings)
 {
     if (!empty($this->title)) {
         $node->appendChild($xml->createElement('div', ['class' => 'title', 'text' => $this->title]));
     }
     $node->appendChild($inner = $xml->createElement('div', 'textbox-container' . (empty($this->title) ? ' no-title' : '')));
     $inner->appendChild($xml->createElement('span', ['class' => 'picked', 'data-value' => $this->value ? $this->type == static::TYPE_DATE ? $this->value->getTimestamp() : $this->value->format('H:i') : null, 'data-placeholder' => $this->placeHolder, 'data-variable' => $this->variableName, 'data-picker-type' => $this->type, 'data-save-value' => $this->save]));
 }
Esempio n. 6
0
 /**
  * Get the html node for this element
  *
  * @param \DOMElement $node
  * @param \AppShed\Remote\XML\DOMDocument $xml
  * @param \AppShed\Remote\HTML\Settings $settings
  */
 protected function getHTMLNodeInner($node, $xml, $settings)
 {
     if ($this->image) {
         $imageDiv = $xml->createElement('div', ['class' => 'image-container']);
         $node->appendChild($imageDiv);
         $imageDiv->appendChild($xml->createImgElement($this->image->getUrl(), 'image', $this->image->getSize()));
     }
     parent::getHTMLNodeInner($node, $xml, $settings);
 }
Esempio n. 7
0
 /**
  * Get the html node for this element
  *
  * @param \DOMElement $node
  * @param \AppShed\Remote\XML\DOMDocument $xml
  * @param \AppShed\Remote\HTML\Settings $settings
  */
 protected function getHTMLNodeInner($node, $xml, $settings)
 {
     $node->appendChild($inner = $xml->createElement('span', 'c-container' . (empty($this->title) ? ' no-title' : '')));
     $params = ['type' => 'checkbox', 'name' => $this->variableName, 'data-variable' => $this->variableName, 'data-save-value' => $this->save, 'value' => $this->value];
     if ($this->checked) {
         $params['checked'] = 'checked';
     }
     $inner->appendChild($xml->createElement('input', $params));
     if (!empty($this->title)) {
         $node->appendChild($xml->createElement('div', ['class' => 'title', 'text' => $this->title]));
     }
 }
Esempio n. 8
0
 /**
  * Get the html node for this element
  *
  * @param \DOMElement $node
  * @param \AppShed\Remote\XML\DOMDocument $xml
  * @param \AppShed\Remote\HTML\Settings $settings
  */
 protected function getHTMLNodeInner($node, $xml, $settings)
 {
     $node->setAttribute('data-capturetype', $this->type);
     $node->setAttribute('data-name', $this->variableName);
     $node->setAttribute('data-save-value', $this->save);
     $node->appendChild($on = $xml->createElement('div', 'on'));
     $on->appendChild($xml->createElement('div', 'image'));
     $on->appendChild($xml->createElement('div', ['class' => 'title', 'text' => $this->title]));
     $on->appendChild($xml->createElement('div', ['class' => 'text', 'text' => $this->subtitle]));
     $on->appendChild($xml->createElement('button', ['class' => 'capture', 'text' => 'Capture']));
     $on->appendChild($xml->createElement('button', ['class' => 'choose', 'text' => 'Choose']));
     $node->appendChild($off = $xml->createElement('div', 'off'));
     $off->appendChild($xml->createElement('div', ['class' => 'title', 'text' => ucfirst($this->type) . ' Capture']));
     $off->appendChild($xml->createElement('div', ['class' => 'text', 'text' => "You need to install this app via the store to use {$this->type} capture"]));
 }
Esempio n. 9
0
 /**
  * Get the html node for this element
  *
  * @param \DOMElement $node
  * @param \AppShed\Remote\XML\DOMDocument $xml
  * @param \AppShed\Remote\HTML\Settings $settings
  */
 protected function getHTMLNodeInner($node, $xml, $settings)
 {
     if (!empty($this->title)) {
         $node->appendChild($xml->createElement('div', ['class' => 'title', 'text' => $this->title]));
     }
     $node->appendChild($inner = $xml->createElement('div', 'selected-container' . (empty($this->title) ? ' no-title' : '')));
     $inner->appendChild($select = $xml->createElement('select', ['name' => $this->variableName, 'data-variable' => $this->variableName, 'data-save-value' => $this->save]));
     foreach ($this->options as $option) {
         $optionNode = $xml->createElement('option', ['value' => $option['value'], 'text' => $option['name']]);
         $select->appendChild($optionNode);
         if ($option['value'] == $this->value) {
             $optionNode->setAttribute('selected', 'selected');
         }
     }
 }
Esempio n. 10
0
 /**
  * Get the html node for this element
  *
  * @param \DOMElement $node
  * @param \AppShed\Remote\XML\DOMDocument $xml
  * @param \AppShed\Remote\HTML\Settings $settings
  */
 protected function getHTMLNodeInner($node, $xml, $settings)
 {
     if (!empty($this->title)) {
         $node->appendChild($xml->createElement('div', ['class' => 'title', 'text' => $this->title]));
     }
     $node->appendChild($inner = $xml->createElement('div', 'c-container' . (empty($this->title) ? ' no-title' : '')));
     $inner->appendChild($xml->createElement('input', ['type' => 'checkbox', 'name' => $this->variable, 'data-variable' => $this->variable, 'data-save-value' => $this->save, 'class' => 'switch', 'value' => $this->value, 'checked' => $this->checked ? 'checked' : null]));
     $inner->appendChild($switch = $xml->createElement('div'));
     $switch->appendChild($slider = $xml->createElement('div', ['class' => 'slider']));
     $slider->appendChild($xml->createElement('div', ['class' => 'on', 'text' => 'ON']));
     $slider->appendChild($xml->createElement('div', ['class' => 'divider']));
     $slider->appendChild($xml->createElement('div', ['class' => 'off', 'text' => 'OFF']));
 }
Esempio n. 11
0
 /**
  *
  * @param \DOMElement $items
  * @param \AppShed\Remote\XML\DOMDocument $xml
  * @param \AppShed\Remote\HTML\Settings $settings
  * @param \AppShed\Remote\Style\CSSDocument $css
  * @param array $javascripts
  *
  * @return \AppShed\Remote\Element\Item\Item[] of header items
  */
 protected function addHTMLChildren($items, $xml, $settings, $css, &$javascripts)
 {
     $items->appendChild($itemsInner = $xml->createElement('script', ['type' => 'application/json']));
     $settings->pushCurrentScreen($this->getId());
     $locs = [];
     $headButtons = [];
     foreach ($this->children as $child) {
         if ($child->getHeaderItem()) {
             $headButtons[] = $child;
         } else {
             $locs[] = $child->getMarkerObject($xml, $settings);
             $child->getCSS($css, $settings);
             $child->getJavascript($javascripts, $settings);
         }
     }
     $itemsInner->appendChild($xml->createTextNode(json_encode($locs)));
     $settings->popCurrentScreen();
     return $headButtons;
 }
Esempio n. 12
0
 /**
  * Get the html node for this element
  *
  * @param \DOMElement $node
  * @param \AppShed\Remote\XML\DOMDocument $xml
  * @param \AppShed\Remote\HTML\Settings $settings
  */
 protected function getHTMLNodeInner($node, $xml, $settings)
 {
     $node->appendChild($htmlNode = $xml->createElement('div', 'html'));
     $html = $this->html;
     if ($html != '') {
         $fragDoc = new \DOMDocument();
         $libxml_previous_state = libxml_use_internal_errors(true);
         $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>');
         libxml_clear_errors();
         libxml_use_internal_errors($libxml_previous_state);
         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);
             }
         }
     }
 }
Esempio n. 13
0
 /**
  * Get the html node for this element
  *
  * @param \DOMElement $node
  * @param \AppShed\Remote\XML\DOMDocument $xml
  * @param \AppShed\Remote\HTML\Settings $settings
  */
 protected function getHTMLNodeInner($node, $xml, $settings)
 {
     $node->setAttribute('data-no-glow', 'no-glow');
     $node->appendChild($inner = $xml->createElement('div', 'item-icon-inner'));
     $inner->appendChild($icon = $xml->createElement('div', 'app-icon' . (empty($this->innerClass) ? '' : ' ' . $this->innerClass)));
     $icon->appendChild($xml->createElement('div', ['class' => 'image', 'style' => $this->icon ? 'background-image:url(\'' . $this->icon->getUrl() . '\')' : '']));
     $icon->appendChild($xml->createElement('div', ['class' => 'background']));
     $this->applyLinkToNode($xml, $icon, $settings);
     $inner->appendChild($xml->createElement('div', ['class' => 'title', 'text' => $this->title]));
 }
Esempio n. 14
0
 /**
  *
  * @param \DOMElement $items
  * @param \AppShed\Remote\XML\DOMDocument $xml
  * @param \AppShed\Remote\HTML\Settings $settings
  * @param \AppShed\Remote\Style\CSSDocument $css
  * @param array $javascripts
  *
  * @return \AppShed\Remote\Element\Item\Item[] of header items
  */
 protected function addHTMLChildren($items, $xml, $settings, $css, &$javascripts)
 {
     $items->appendChild($itemsInner = $xml->createElement('div', 'items-inner'));
     $itemsInner->appendChild($table = $xml->createElement('table'));
     $table->appendChild($row = $xml->createElement('tr'));
     $settings->pushCurrentScreen($this->getId());
     $i = 0;
     $headButtons = [];
     foreach ($this->children as $child) {
         if ($child->getHeaderItem()) {
             $headButtons[] = $child;
         } else {
             $child->getCSS($css, $settings);
             $outerChild = new GalleryOuterImage($child->getThumbImage());
             $outerChild->copyStyles($child);
             $id = $child->getId(true);
             $outerChild->setId($id);
             if (!$child->getDisableInner()) {
                 $outerChild->setScreenLink($this->innerScreen, '#' . $child->getIdType() . $settings->getPrefix() . $child->getId());
             }
             $outerChildNode = $outerChild->getHTMLNode($xml, $settings);
             if ($outerChildNode) {
                 if ($i == $this->columns) {
                     $table->appendChild($row = $xml->createElement('tr'));
                     $i = 0;
                 }
                 $i++;
                 $row->appendChild($outerChildNode);
             }
         }
     }
     while ($i < $this->columns) {
         $row->appendChild($xml->createElement('td'));
         $i++;
     }
     $settings->popCurrentScreen();
     return $headButtons;
 }
Esempio n. 15
0
 /**
  * @param \AppShed\Remote\XML\DOMDocument $xml
  * @param \AppShed\Remote\HTML\Settings $settings
  *
  * @return array
  */
 public function getMarkerObject($xml, $settings)
 {
     return ['title' => $this->title, 'subtitle' => $this->subtitle, 'latitude' => $this->latitude, 'longitude' => $this->longitude, 'html' => $xml->saveXML($this->getHTMLNode($xml, $settings))];
 }
Esempio n. 16
0
 /**
  *
  * @param \DOMElement $items
  * @param \AppShed\Remote\XML\DOMDocument $xml
  * @param \AppShed\Remote\HTML\Settings $settings
  * @param \AppShed\Remote\Style\CSSDocument $css
  * @param array $javascripts
  *
  * @return \AppShed\Remote\Element\Item\Item[] of header items
  */
 protected function addHTMLChildren($items, $xml, $settings, $css, &$javascripts)
 {
     $items->appendChild($itemsInner = $xml->createElement('div', 'items-inner'));
     //Each screen has up to 16 apps
     /**
      * @var \AppShed\Remote\Element\Item\AppIcon[][]
      */
     $screens = array_chunk($this->children, 16);
     //Home bar
     $items->appendChild($homeBar = $xml->createElement('div', ['class' => 'home-bar']));
     $items->appendChild($xml->createElement('div', 'home-underlay'));
     //Dots
     $homeBar->appendChild($homeDots = $xml->createElement('div', ['class' => 'home-dots']));
     $homeBar->appendChild($xml->createElement('div', ['class' => 'home-bar-bg']));
     $homeDots->appendChild($cnt = $xml->createElement('div', ['class' => 'home-dots-inner']));
     $screensCount = count($screens) + 1;
     for ($i = 0; $i < $screensCount; $i++) {
         $cnt->appendChild($xml->createElement('div', ['class' => 'dot ' . ($i == 0 ? 'curr search' : 'page'), 'text' => $i == 0 ? '' : $i]));
     }
     //Empty screen if there are no apps
     if (count($screens) == 0) {
         $cnt->appendChild($xml->createElement('div', ['class' => 'dot page', 'text' => '1']));
     }
     $homeDots->appendChild($xml->createElement('div', ['style' => 'clear:both']));
     //Home bar buttons
     if (count($this->homeChildren) > 0) {
         $homeBar->appendChild($homeBarButtons = $xml->createElement('div', ['class' => 'home-bar-buttons']));
         foreach ($this->homeChildren as $homeButton) {
             $childNode = $homeButton->getHTMLNode($xml, $settings);
             if ($childNode) {
                 $homeBarButtons->appendChild($childNode);
             }
             $homeButton->getCSS($css, $settings);
             $homeButton->getJavascript($javascripts, $settings);
         }
     }
     //Search
     $itemsInner->appendChild($searchEl = $xml->createElement('div', ['class' => 'apps search']));
     $searchEl->appendChild($appInner = $xml->createElement('div', ['class' => 'apps-inner']));
     $appInner->appendChild($searchContainer = $xml->createElement('div', ['class' => 'search-holder']));
     $searchContainer->appendChild($xml->createElement('input', ['type' => 'search', 'placeholder' => 'Search', 'class' => 'search-box', 'x-webkit-speech' => 'x-webkit-speech']));
     $appInner->appendChild($xml->createElement('div', ['class' => 'search-results']));
     $settings->pushCurrentScreen($this->getId());
     $i = 1;
     $headButtons = [];
     /** @var \AppShed\Remote\Element\Item\AppIcon[] $screen */
     foreach ($screens as $screen) {
         $itemsInner->appendChild($appsEl = $xml->createElement('div', ['class' => 'apps']));
         $appsEl->appendChild($xml->createElement('div', ['class' => 'apps-title', 'text' => "Page {$i}"]));
         $appsEl->appendChild($appInner = $xml->createElement('div', ['class' => 'apps-inner']));
         foreach ($screen as $app) {
             if ($app->getHeaderItem()) {
                 $headButtons[] = $app;
             } else {
                 $childNode = $app->getHTMLNode($xml, $settings);
                 if ($childNode) {
                     $appInner->appendChild($childNode);
                 }
                 $app->getCSS($css, $settings);
                 $app->getJavascript($javascripts, $settings);
             }
         }
         $i++;
     }
     //Empty screen if there are no apps
     if (count($screens) == 0) {
         $itemsInner->appendChild($appsEl = $xml->createElement('div', ['class' => 'apps']));
         $appsEl->appendChild($xml->createElement('div', ['class' => 'apps-title', 'text' => "Page {$i}"]));
         $appsEl->appendChild($appInner = $xml->createElement('div', ['class' => 'apps-inner']));
     }
     $settings->popCurrentScreen();
     return $headButtons;
 }
Esempio n. 17
0
 /**
  * Get the html node for this element
  *
  * @param \AppShed\Remote\XML\DOMDocument $xml
  * @param \AppShed\Remote\HTML\Settings $settings
  *
  * @return \DOMElement
  */
 public function getHTMLNode($xml, $settings)
 {
     if (!$this->node) {
         $this->node = $xml->createElement(static::HTML_TAG, $this->getClass());
         $this->node->setAttribute('id', $this->getIdType() . $settings->getPrefix() . $this->getId());
         if (!$this->editable) {
             $this->node->setAttribute('data-editable', 'false');
         }
         $this->getHTMLNodeInner($this->node, $xml, $settings);
     }
     return $this->node;
 }
Esempio n. 18
0
 /**
  * Get the html node for this element
  *
  * @param \DOMElement $node
  * @param \AppShed\Remote\XML\DOMDocument $xml
  * @param \AppShed\Remote\HTML\Settings $settings
  */
 protected function getHTMLNodeInner($node, $xml, $settings)
 {
     $node->appendChild($xml->createElement('div', ['class' => 'title', 'text' => $this->title]));
     $node->appendChild($xml->createElement('div', ['class' => 'text', 'text' => $this->subtitle]));
     $this->applyLinkToNode($xml, $node, $settings);
 }
Esempio n. 19
0
 /**
  * Get the html node for this element
  *
  * @param \DOMElement $node
  * @param \AppShed\Remote\XML\DOMDocument $xml
  * @param \AppShed\Remote\HTML\Settings $settings
  */
 protected function getHTMLNodeInner($node, $xml, $settings)
 {
     $css = new CSSDocument();
     $idSelector = $css->getIdSelector($this->getIdType() . $settings->getPrefix() . $this->getId());
     if ($this->customCSS) {
         $css->addCSSText($this->customCSS, $idSelector);
     }
     $this->getCSS($css, $settings);
     if ($this->splash) {
         $this->splash->toCSS($css, $idSelector . $css->getClassSelector('splash'));
     }
     if ($this->name) {
         $node->setAttribute('data-name', $this->name);
     }
     if ($this->description) {
         $node->setAttribute('data-description', $this->description);
     }
     if ($this->flag) {
         $node->setAttribute('data-flag', $this->flag);
     }
     if ($this->previewUrl) {
         $node->setAttribute('data-preview-url', $this->previewUrl);
     }
     if ($this->webviewUrl) {
         $node->setAttribute('data-webview-url', $this->webviewUrl);
     }
     if ($this->disableIos7) {
         $node->setAttribute('data-disable-ios7', 'data-disable-ios7');
     }
     if ($this->disableMasking) {
         $node->setAttribute('data-disable-masking', 'data-disable-masking');
     }
     if ($this->icon) {
         $node->setAttribute('data-icon', $this->icon->getUrl());
         $idSelector = $css->getIdSelector($this->getIdType() . $settings->getPrefix() . $this->getId());
         $css->addRule([".android .phone-navigator {$idSelector}.app .app-navigator .screen .header .back"], 'background-image', $css->getURLValue($this->icon->getUrl()));
         $css->addRule([".blackberry .phone-navigator {$idSelector}.app .app-navigator .screen .header"], 'background-image', $css->getURLValue($this->icon->getUrl()));
     }
     if ($settings->getFetchUrl()) {
         $node->setAttribute('data-fetch-url', $settings->getFetchUrl());
     }
     $node->appendChild($navigator = $xml->createElement('div', 'app-navigator'));
     $navigator->appendChild($navinner = $xml->createElement('div', 'app-navigator-inner'));
     $navinner->appendChild($xml->createElement('div', 'app-navigator-inner-sides'));
     $navinner->appendChild($xml->createElement('div', 'app-navigator-inner-sides'));
     if ($this->ads) {
         $xml->addClass($navigator, 'ads');
         $node->appendChild($xml->createElement('div', 'ad-holder'));
     }
     $node->appendChild($tabbarOuter = $xml->createElement('div', 'tab-bar'));
     $tabbarOuter->appendChild($tabbar = $xml->createElement('table'));
     $tabbar->appendChild($tabbarinner = $xml->createElement('tr', 'tar-bar-inner'));
     foreach ($this->children as $tab) {
         $tabbarinner->appendChild($tab->getHTMLNode($xml, $settings));
         $tab->getCSS($css, $settings);
     }
     $settings->addApp($this->getId(), $xml->saveXML($node), $css, $this->splash ? "<style scoped>" . $css->toSplashString() . "</style><div class=\"splash\" id=\"app" . $this->getId() . "\"></div>" : null, $this->updated === true ? new \DateTime() : $this->updated, ['login' => null, 'register' => null], $this->js);
 }
Esempio n. 20
0
 /**
  * Get the html node for this element
  *
  * @param \DOMElement $node
  * @param \AppShed\Remote\XML\DOMDocument $xml
  * @param \AppShed\Remote\HTML\Settings $settings
  */
 protected function getHTMLNodeInner($node, $xml, $settings)
 {
     $node->appendChild($xml->createImgElement($this->image->getUrl(), 'image'));
     $this->applyLinkToNode($xml, $node, $settings);
 }
Esempio n. 21
0
 /**
  * Get the html node for this element
  *
  * @param \DOMElement $node
  * @param \AppShed\Remote\XML\DOMDocument $xml
  * @param \AppShed\Remote\HTML\Settings $settings
  */
 protected function getHTMLNodeInner($node, $xml, $settings)
 {
     if (!empty($this->title)) {
         $node->appendChild($xml->createElement('div', ['class' => 'title', 'text' => $this->title]));
     }
     $node->appendChild($inner = $xml->createElement('div', 'textbox-container' . (empty($this->title) ? ' no-title' : '')));
     $inner->appendChild($xml->createElement('input', ['class' => 'textbox' . ($this->localSearch ? ' localsearch' : ''), 'type' => static::INPUT_TYPE, 'name' => $this->variableName, 'value' => $this->value, 'placeholder' => $this->placeHolder, 'data-variable' => $this->variableName, 'data-save-value' => $this->save, 'data-autocomplete-url' => $this->autocomplete, 'data-autocomplete-variable' => $this->autoCompleteVariable ? $this->autoCompleteVariable : $this->variableName]));
 }