getPk(); $row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]); }); } public function getTypeList() { return ['virtual' => __('Type virtual'), 'reality' => __('Type reality')]; } public function getStatusList() { return ['normal' => __('Normal'), 'hidden' => __('Hidden')]; } public function getTypeTextAttr($value, $data) { $value = $value ?: ($data['type'] ?? ''); $list = $this->getTypeList(); return $list[$value] ?? ''; } public function getStatusTextAttr($value, $data) { $value = $value ?: ($data['status'] ?? ''); $list = $this->getStatusList(); return $list[$value] ?? ''; } }