<?php
/**
 * @copyright (c) Kufer Software GmbH, Loisachstrasse 4, D-84453 Mühldorf
 */

namespace Kufer\KuferTools\Basis\Kursdetails\DetailsReiter\Termine\TerminBearbeiten\KursAnpassenNachTerminBearbeiten;

abstract class KursAnpassenNachTerminBearbeitenController extends \Kufer\KuferTools\Basis\Controller\AjaxToolController
{
  
  protected function getRequestObj()
  {
    $requestObj = new KursAnpassenNachTerminBearbeitenRequest();
    $requestObj->knr = \GetOperations::getVarValue('knr');

    
    $requestObj->stundenanz_check = \PostOperations::isDefined('stundenanz_check');
    $requestObj->stundenanz = \PostOperations::getVarValue('stundenanz');
    $requestObj->ende_check = \PostOperations::isDefined('ende_check');
    $requestObj->ende = \PostOperations::getVarValue('ende');
    $requestObj->dauer_check = \PostOperations::isDefined('dauer_check');
    $requestObj->dauer = \PostOperations::getVarValue('dauer');
    $requestObj->beginn_check = \PostOperations::isDefined('beginn_check');
    $requestObj->beginn = \PostOperations::getVarValue('beginn');
    $requestObj->beginn_dat_check = \PostOperations::isDefined('beginn_dat_check');
    $requestObj->beginn_dat = \PostOperations::getVarValue('beginn_dat');
    $requestObj->ende_dat_check = \PostOperations::isDefined('ende_dat_check');
    $requestObj->ende_dat = \PostOperations::getVarValue('ende_dat');

    $action = $this->getActionVal();

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

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