__('Work_week 1'), '2' => __('Work_week 2'), '3' => __('Work_week 3'), '4' => __('Work_week 4'), '5' => __('Work_week 5'), '6' => __('Work_week 6'), '7' => __('Work_week 7')]; } public function getStatusList() { return ['0' => __('Status 0'), '1' => __('Status 1'), '-1' => __('Status -1')]; } public function getWorkWeekTextAttr($value, $data) { $value = $value ? $value : (isset($data['work_week']) ? $data['work_week'] : ''); $valueArr = explode(',', $value); $list = $this->getWorkWeekList(); return implode(',', array_intersect_key($list, array_flip($valueArr))); } public function getStatusTextAttr($value, $data) { $value = $value ? $value : (isset($data['status']) ? $data['status'] : ''); $list = $this->getStatusList(); return isset($list[$value]) ? $list[$value] : ''; } protected function setWorkWeekAttr($value) { return is_array($value) ? implode(',', $value) : $value; } }