/**
  * @return \RedDevil\View
  * @Method('GET')
  */
 public function index() : View
 {
     $service = new ConferencesService($this->dbContext);
     $allConferences = $service->getAllConferences();
     return new View("home", "index", $allConferences);
 }
 /**
  * @param BatchBookLectures $lectures
  * @ Method('POST')
  * @Route('conferences/batchBook')
  */
 public function batchBook(BatchBookLectures $lectures)
 {
     $service = new ConferencesService($this->dbContext);
     $response = $service->batchBook($lectures);
     foreach ($response->getModel() as $response) {
         if ($response->hasError()) {
             $this->addErrorMessage($response->getMessage());
         } else {
             $this->addInfoMessage($response->getMessage());
         }
     }
     $lectureId = $lectures->getLectureIds()[0];
     $conferenceId = $this->dbContext->getLecturesRepository()->filterById(" = {$lectureId}")->findOne()->getConferenceId();
     $this->redirectToUrl('/conferences/details/' . $conferenceId);
 }