Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 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;
 }