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

namespace Kufer\Web\KuferTools\Veranstalter\KursUebersicht\Detailsreiter\Termine\SmsKursort;

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

  protected function getRequestObj()
  {
    $requestObj = new SendSmsKursortRequest();
    $requestObj->knr = \GetOperations::getVarValue('knr');
    $requestObj->kursTagId = \GetOperations::getVarValue('kurstag_id');
    $requestObj->smsBody = \PostOperations::getVarValue('sms_body');

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

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

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