Ejemplo n.º 1
0
 /**
  * Make array container for generic element
  * 
  * @param  \DOMXPath $element
  * @return array         
  */
 public function makeElement($element, $parent = null)
 {
     $type = explode(":", $element->getAttribute('type'));
     return array('label' => $element->getAttribute('name'), 'model' => $parent ? $parent . '.' . $element->getAttribute('name') : $element->getAttribute('name'), 'type' => $type[1] == 'string' ? 'text' : $type[1]);
 }
Ejemplo n.º 2
0
 /**
  * Make array container for generic element
  * 
  * @param  \DOMXPath $element
  * @return array         
  */
 public function makeElement($element)
 {
     $type = explode(":", $element->getAttribute('type'));
     return array('type' => $type[1] == 'string' ? 'text' : $type[1]);
 }