protected function saveRecordInTable($table) { // $postData = array(); // // foreach ( Db::colNames($table) as $column ) { // if ( isset($_POST[$column]) ) { // $postData[$column] = $_POST[$column]; // } // } if ($this->context instanceof \Meta\Builder\Object\Form) { $postData = $this->context->getData(); // salva dados do POST de um form $id = Db::saveSafe($table, $postData); if ($id) { // salva o ultimo id inserido temporariamente $this->lastInsertID = $id; return true; } return false; } return true; }