/** * find games by rencent_games field * @return \yii\db\ActiveQuery */ public function getRecentGames() { return $this->hasOne(Game::className(), ['id' => 'recent_games']); }
/** * @return \yii\db\ActiveQuery */ public function getGame() { if ($this->relation_game_id != null) { return $this->hasOne(Game::className(), ['id' => 'relation_game_id']); } return new Game(); }
public function getRelationGame() { return $this->hasOne(Game::className(), ['id' => 'relation_game']); }
/** * @return \yii\db\ActiveQuery */ public function getGame() { return $this->hasOne(Game::className(), ['id' => 'game_id']); }
/** * @return \yii\db\ActiveQuery */ public function getGames() { return $this->hasMany(Game::className(), ['category_id' => 'id']); }