getPk(); $row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]); } }); } public function getPriceTypeList() { return ['fixed' => __('Fixed'), 'quote' => __('Quote'), 'range' => __('Range')]; } public function getStatusList() { return ['normal' => __('Normal'), 'hidden' => __('Hidden')]; } public function getPriceTypeTextAttr($value, $data) { $value = $value ?: ($data['price_type'] ?? ''); $list = $this->getPriceTypeList(); return $list[$value] ?? ''; } public function getStatusTextAttr($value, $data) { $value = $value ?: ($data['status'] ?? ''); $list = $this->getStatusList(); return $list[$value] ?? ''; } }