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

namespace Kufer\Web\KuferTools\Basis\AnwesenheitenKurs;

abstract class AnwSpeichernController extends \Kufer\Web\KuferTools\Basis\Controller\ToolController
{
  protected function getRequestObj()
  {
    $requestObj = new AnwSpeichernRequest();
    $requestObj->knr = \GetOperations::getVarValue('knr');
    $requestObj->belKtInfos = \JsonOperations::getFromStringBase64(\PostOperations::getVarValue('BelKtInfos'));

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

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

  abstract protected function getToolId();
}