public function getCurrentDisciplines() { return $this->hasMany(GroupHasDiscipline::className(), ['group_id' => 'id'])->where(['semester_number' => $this->currentSemester->semester_number]); }
/** * @get grops has discipline */ public function getGroupHasDisciplines() { return $this->hasMany(GroupHasDiscipline::className(), ['discipline_id' => 'id']); }
/** * @get ghd */ public function getGroupHasDiscipline() { return $this->hasOne(GroupHasDiscipline::className(), ['id' => 'ghd_id']); }