public function AddPassenger($formno, $title, $firstname, $lastname, $btnpress = null) { $passenger = new Passenger(); $passenger->formid = $formno; $passenger->title = $title; $passenger->firstname = $firstname; $passenger->lastname = $lastname; $passenger->analyser(); $passenger_list = Session::get("Passengers"); if ($passenger_list == NULL) { $passenger_list = []; } if ($passenger->validated()) { } else { Session::set("passage-form", $formno); ContextManager::ValidationFor("warning", $passenger->getError()); } $passenger_list[$formno] = $passenger; Session::set("Passengers", $passenger_list); Session::set("Passager-Valid", $this->countValidPessenger()); $this->ViewBag("Controller", "Booking"); $this->ViewBag("Page", "PassenderForms"); return $this->View($this->viewModel->flightDbModel, "Booking", "Index"); }