Ejemplo n.º 1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getForum()
 {
     return $this->hasOne(YBoardForum::className(), ['id' => 'forum_id']);
 }
Ejemplo n.º 2
0
 /**
  * @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();
 }