public function getParticipants($reset = false) { if ($reset || !isset($this->_participants)) { $this->_participants = $this->hasMany(Participant::className(), ['shift_id' => 'id']); } return $this->_participants; }
/** * @return \yii\db\ActiveQuery */ public function getParticipants() { return $this->hasMany(Participant::className(), ['activity' => 'id']); }
/** * Get the shift participation this user is a part of */ public function getParticipation() { return $this->hasMany(Participant::className(), ['user_id' => 'id']); }