<?php
/**
 * @copyright (c) Kufer Software GmbH, Oderstraße 7, D-84453 Mühldorf
 */

namespace Kufer\Web\KuferTools\Teilnehmer\Kursvorschlag;

class SendKursvorschlagController extends \Kufer\Web\KuferTools\Basis\Controller\ToolController
{
  protected function getUseCase(): \Kufer\Web\KuferTools\Basis\UseCase\UseCase
  {
    return new SendKursvorschlagUseCase($this->getRequestObj());
  }

  protected function getRequestObj()
  {
    $requestObj = new SendKursvorschlagRequest();
    $requestObj->kursthema = \PostOperations::getVarValue('kursthema');
    $requestObj->kursinhalt = \PostOperations::getVarValue('kursinhalt');
    $requestObj->bemerkungen = \PostOperations::getVarValue('bemerkungen');
    $requestObj->kursdauer = \PostOperations::getVarValue('kursdauer');
    $requestObj->dauerForm = \PostOperations::getVarValue('dauerForm');
    $requestObj->uhrzeit = \PostOperations::getVarValue('uhrzeit');
    $requestObj->tageszeit = \PostOperations::getVarValue('tageszeit');

    
    $action = \GetOperations::getVarValue('action');

    return $this->handleXsrf($requestObj, $action);
  }

  protected function getPresenter($pUseCaseResponse)
  {
    return new SendKursvorschlagPresenter($pUseCaseResponse);
  }
}