getPk(); $row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]); } }); } public function getTypeList() { return ['in' => __('Type in'), 'out' => __('Type out')]; } public function getShowtypeList() { return ['image' => __('Showtype image'), 'video' => __('Showtype video')]; } public function getTypeTextAttr($value, $data) { $value = $value ?: ($data['type'] ?? ''); $list = $this->getTypeList(); return $list[$value] ?? ''; } public function getShowtypeTextAttr($value, $data) { $value = $value ?: ($data['showtype'] ?? ''); $list = $this->getShowtypeList(); return $list[$value] ?? ''; } }