Example #1
0
 /**
  * @return mixed|string
  */
 public function getFormType()
 {
     $code = file_get_contents(dirname(__FILE__) . "/Form/DataType.php");
     $code = $this->cleanFormType($code);
     $fields = "";
     foreach ($this->getFields() as $field) {
         if ($field['editable']) {
             $OBjField = new Field($field['dataType'], $field['name'], $field['varname'], array('path' => "admin_" . strtolower($this->entityName)));
             $fields .= $OBjField->getBuilder();
         }
     }
     $code = str_replace('$builder->add("");', $fields, $code);
     return $code;
 }