__('Add_mode 0'), '1' => __('Add_mode 1')]; } public function getInviteJoinGroupList() { return ['0' => __('Invite_join_group 0'), '1' => __('Invite_join_group 1')]; } public function getSpeakList() { return ['0' => __('Speak 0'), '1' => __('Speak 1')]; } public function getHistoryMessageList() { return ['0' => __('History_message 0'), '1' => __('History_message 1')]; } public function getAddModeTextAttr($value, $data) { $value = $value ? $value : (isset($data['add_mode']) ? $data['add_mode'] : ''); $list = $this->getAddModeList(); return isset($list[$value]) ? $list[$value] : ''; } public function getInviteJoinGroupTextAttr($value, $data) { $value = $value ? $value : (isset($data['invite_join_group']) ? $data['invite_join_group'] : ''); $list = $this->getInviteJoinGroupList(); return isset($list[$value]) ? $list[$value] : ''; } public function getSpeakTextAttr($value, $data) { $value = $value ? $value : (isset($data['speak']) ? $data['speak'] : ''); $list = $this->getSpeakList(); return isset($list[$value]) ? $list[$value] : ''; } public function getHistoryMessageTextAttr($value, $data) { $value = $value ? $value : (isset($data['history_message']) ? $data['history_message'] : ''); $list = $this->getHistoryMessageList(); return isset($list[$value]) ? $list[$value] : ''; } public function fastimuser() { return $this->belongsTo('app\admin\model\fastim\User', 'leader', 'id', [], 'LEFT')->setEagerlyType(0); } }