Example #1
0
 public function getPeriodPreferences()
 {
     return $this->hasMany(PeriodType::className(), ['id' => 'period_type_id'])->viaTable('student_period_preference', ['student_id' => 'id'])->all();
 }
Example #2
0
 /**
  * @return The PeriodTypes
  */
 public function getPeriodTypes()
 {
     return $this->hasMany(PeriodType::className(), ['id' => 'duration_id'])->viaTable('vacancy_period', ['vacancy_id' => 'id']);
 }
Example #3
0
 public static function getDurationsList()
 {
     $periods = PeriodType::find()->all();
     return ArrayHelper::map($periods, 'id', 'duration');
 }