示例#1
0
文件: Crud.php 项目: moiseh/codegen
 public function getTableFields()
 {
     $dbCols = \Meta\Db::colInfo($this->table);
     $fields = array();
     foreach ($dbCols as $info) {
         $name = $info->Field;
         // ignore some fields
         if (in_array($name, array('password'))) {
             continue;
         }
         $fields[$info->Field] = $this->getFieldType($info, array('name' => $name, 'label' => camelize($info->Field), 'isRequired' => $info->Null == 'NO'));
     }
     return $fields;
 }
示例#2
0
文件: Crud.php 项目: moiseh/codegen
 public function getTableCols()
 {
     $dbCols = \Meta\Db::colInfo($this->table);
     $cols = array();
     foreach ($dbCols as $info) {
         $name = $info->Field;
         // ignore some fields
         if (in_array($name, array('password'))) {
             continue;
         }
         $cols[$info->Field] = $this->getColType($info, array('id' => $name, 'label' => camelize($info->Field)));
     }
     return $cols;
 }