コード例 #1
0
 public function getTeam($reset = false)
 {
     if ($reset || !isset($this->_team)) {
         $this->_team = $this->hasOne(Team::className(), ['id' => 'team_id']);
     }
     return $this->_team;
 }
コード例 #2
0
ファイル: Match.php プロジェクト: alexsynytskiy/Dynamomania
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getTeamGuest()
 {
     return $this->hasOne(Team::className(), ['id' => 'command_guest_id']);
 }
コード例 #3
0
ファイル: VideoTeam.php プロジェクト: alexberriman/l4d.tv
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getTeam()
 {
     return $this->hasOne(Team::className(), ['id' => 'team_id']);
 }
コード例 #4
0
ファイル: Tournament.php プロジェクト: alexberriman/l4d.tv
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getWinningTeam()
 {
     return $this->hasOne(Team::className(), ['id' => 'winning_team_id']);
 }
コード例 #5
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getTeamFrom()
 {
     return $this->hasOne(Team::className(), ['id' => 'command_from_id']);
 }
コード例 #6
0
ファイル: Competition.php プロジェクト: kleitz/golfleague
 /**
  * Returns competition teams, if any
  *
  * @return \yii\db\ActiveQuery
  */
 public function getTeams()
 {
     return $this->hasMany(Team::className(), ['id' => 'team_id'])->viaTable('registration', ['competition_id' => 'id']);
 }
コード例 #7
0
ファイル: Video.php プロジェクト: alexberriman/l4d.tv
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getTeams()
 {
     return $this->hasMany(Team::className(), ['id' => 'team_id'])->viaTable('{{%video_team}}', ['video_id' => 'id']);
 }
コード例 #8
0
 public function getTeams($reset = false)
 {
     if ($reset || !isset($this->_teams)) {
         $this->_teams = $this->hasMany(Team::className(), ['event_id' => 'id']);
     }
     return $this->_teams;
 }
コード例 #9
0
ファイル: Player.php プロジェクト: alexberriman/l4d.tv
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getTeams()
 {
     return $this->hasMany(Team::className(), ['id' => 'team_id'])->viaTable('{{%team_player}}', ['player_id' => 'id']);
 }