示例#1
0
 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;
 }
 /**
  * @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
 public function save()
 {
     return \Repository\Venue::createInstance()->save($this);
 }