__('Default 1'), '0' => __('Default 0')]; } public function getStatusList() { return ['normal' => __('Normal'), 'hidden' => __('Hidden')]; } public function getDefaultTextAttr($value, $data) { $value = $value ? $value : (isset($data['default']) ? $data['default'] : ''); $list = $this->getDefaultList(); return isset($list[$value]) ? $list[$value] : ''; } public function getStatusTextAttr($value, $data) { $value = $value ? $value : (isset($data['status']) ? $data['status'] : ''); $list = $this->getStatusList(); return isset($list[$value]) ? $list[$value] : ''; } public function user() { return $this->belongsTo('app\common\model\User', 'user_id', 'username', [], 'LEFT')->setEagerlyType(0); } }