__('Gender_type 1'), '0' => __('Gender_type 0')]; } public function getAgeTypeList() { return ['0' => __('Age_type 0'), '1' => __('Age_type 1'), '2' => __('Age_type 2')]; } public function getGenderTypeTextAttr($value, $data) { $value = $value ? $value : (isset($data['gender_type']) ? $data['gender_type'] : ''); $list = $this->getGenderTypeList(); return isset($list[$value]) ? $list[$value] : ''; } public function getAgeTypeTextAttr($value, $data) { $value = $value ? $value : (isset($data['age_type']) ? $data['age_type'] : ''); $list = $this->getAgeTypeList(); return isset($list[$value]) ? $list[$value] : ''; } public function matchtype() { return $this->belongsTo('app\admin\model\match\MatchType', 'type_id', 'id', [], 'LEFT')->setEagerlyType(0); } }