public function createLecture(\BindingModels\CreateLecture $lecture)
 {
     $this->headerData();
     $this->view->showView();
     /*
      * TODO
      * Conference ->
      * get conference date
      * add this date in option list
      * the user has to choose date for every lecture
      * get hall name -> add all halls in option list
      */
     $lectureName = $lecture->getName();
     $startTime = $lecture->getStartTime();
     $endTime = $lecture->getEndTime();
     $lectureBreak = $lecture->getBreak();
     $lectureDay = $lecture->getDay();
     $hallName = $lecture->getHallName();
     $confId = $lecture->getIdConference();
     $hall = \Repository\Hall::createInstance()->getHallIdByConference($confId, $hallName);
     $hallId = $hall['id'];
     $lecture = new LectureModel($lectureName, $startTime, $endTime, $lectureBreak, $hallId, $confId, $lectureDay);
     $lecture->save();
     exit;
 }
示例#2
0
 public function save()
 {
     return \Repository\Hall::createInstance()->save($this);
 }