/** * @return \yii\db\ActiveQuery */ public function getForum() { return $this->hasOne(YBoardForum::className(), ['id' => 'forum_id']); }
/** * @return \yii\db\ActiveQuery */ public function getForums() { return $this->hasMany(YBoardForum::className(), ['cat_id' => 'id'])->andWhere('cat_id IS NOT NULL')->memberGroupScope($this->uid)->sortedScope(); }