Example #1
0
 /**
  * @param $data
  * @param $nomer
  * @param $tema
  * @param $chastTemy
  * @param KursForm $kurs
  * @return array
  */
 private function createZanyatie($data, $nomer, $tema, $chastTemy, $kurs)
 {
     $zanyatie = new Zanyatie();
     $zct = new ZanyatieChastiTemy();
     $zanyatie->data = $data;
     $zanyatie->nomer = $nomer;
     $zct->tema = $tema;
     $zct->chast_temy = $chastTemy;
     $temaRecord = Tema::findOne($tema);
     $zanyatie->setDefaultsFromKurs($kurs, $temaRecord);
     return [$zanyatie, $zct];
 }