Ejemplo n.º 1
0
 /**
  * Creates the HTML code for a form field
  *
  * @param \Xily\Xml $xmlField
  */
 private function buildField($xmlField)
 {
     $id = (string) $xmlField->id();
     $html = '<div class="control-group">';
     $html .= '<label class="control-label"' . ($id === '' ? '' : ' for="' . $id . '"') . '>' . $xmlField->attribute('label') . '</label>' . '<div class="controls">';
     $xmlField->removeAttribute('label');
     return $html . $xmlField->run() . '</div></div>';
 }
Ejemplo n.º 2
0
 /**
  * Includes another XML document
  *
  * @param \Xily\Xml $xmlNode
  */
 public function parse_include($xmlNode)
 {
     if (!$xmlNode->hasAttribute('file') || !file_exists($this->strIncludePath . $xmlNode->attribute('file'))) {
         return '';
     }
     return $this->parseTag(\Xily\Xml::create($this->strIncludePath . $xmlNode->attribute('file'), 1));
 }