/**
  * @param ConferenceInputModel $model
  * @Method('GET', 'POST')
  * @Validatetoken('token')
  * @return View
  */
 public function add(ConferenceInputModel $model)
 {
     if (!$model->isValid()) {
         return new View('conferences', 'add', $model);
     }
     $service = new ConferencesService($this->dbContext);
     if (HttpContext::getInstance()->isPost()) {
         $result = $service->addConference($model);
         if (!$result->hasError()) {
             $this->addInfoMessage($result->getMessage());
             $this->redirect('conferences', 'own');
         } else {
             $this->addErrorMessage($result->getMessage());
             $this->redirect('conferences', 'own');
         }
     } else {
         return new View('conferences', 'add', new ConferenceInputModel());
     }
 }