예제 #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;
 }
예제 #2
0
 public function index()
 {
     $this->headerData();
     $conf = Conference::createInstance()->selectAllConferencesDetails();
     $this->view->conference = $conf;
     $this->view->showView();
     $this->view->part('footer');
 }
 /**
  * @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');
 }
예제 #4
0
 public function save()
 {
     return \Repository\Conference::createInstance()->save($this);
 }