__('Status 0'), '1' => __('Status 1'), '2' => __('Status 2'), '3' => __('Status 3'), '-1' => __('Status -1'), '-2' => __('Status -2')]; } public function getProcesstimeTextAttr($value, $data) { $value = $value ? $value : (isset($data['processtime']) ? $data['processtime'] : ''); return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value; } public function getConfirmtimeTextAttr($value, $data) { $value = $value ? $value : (isset($data['confirmtime']) ? $data['confirmtime'] : ''); return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value; } public function getEndtimeTextAttr($value, $data) { $value = $value ? $value : (isset($data['endtime']) ? $data['endtime'] : ''); return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value; } public function getStatusTextAttr($value, $data) { $value = $value ? $value : (isset($data['status']) ? $data['status'] : ''); $list = $this->getStatusList(); return isset($list[$value]) ? $list[$value] : ''; } protected function setProcesstimeAttr($value) { return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value); } protected function setConfirmtimeAttr($value) { return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value); } protected function setEndtimeAttr($value) { return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value); } }