コード例 #1
0
ファイル: Conference.php プロジェクト: nikolovns/mvsFirstTry
 public function createConference(CreateConference $conference)
 {
     $this->headerData();
     $this->view->showView();
     $venueName = $conference->getName();
     $venueAddress = $conference->getAddress();
     $confName = $conference->getConfName();
     $startDate = $conference->getStartDate();
     $endDate = $conference->getEndDate();
     $userId = $_SESSION['id'];
     /**
      * this part added venue's data
      */
     $venue = new VenueModel($venueName, $venueAddress);
     $venue->save();
     $venueId = \Repository\Venue::createInstance()->selectId();
     $conference = new ConferenceModel($confName, $startDate, $endDate, $venueId, $userId);
     $conference->save();
     $conf = Conference::createInstance()->selectAllConferencesDetails();
     $confId = array_pop($conf);
     $confId = $confId->getId();
     //        $confId = array_pop($conf['id']);
     if ($conference->getConfName() != null) {
         //            var_dump($venueId);
         $_SESSION['venue_id'] = $venueId;
         $_SESSION['conferenceId'] = $confId;
         $user = \Repository\User::createInstance()->editUserId($userId);
         $this->redirectControllers('hall', 'createHall');
     }
     $this->view->part('footer');
     exit;
 }
コード例 #2
0
 /**
  * @GET
  * @ROUTE/conf/conference/$id=\d
  * @param $id
  */
 public function conf($id)
 {
     $this->headerData();
     $conference = Conference::createInstance()->selectConferenceById($id);
     $this->view->conference = $conference;
     $venue = Venue::createInstance()->selectByConferenceId($id);
     $this->view->venue = $venue;
     $this->view->showCustomView('Conf');
     $this->view->part('footer');
 }
コード例 #3
0
ファイル: VenueModel.php プロジェクト: nikolovns/mvsFirstTry
 public function save()
 {
     return \Repository\Venue::createInstance()->save($this);
 }