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

namespace Kufer\KuferTools\Teilnehmer\Visitenkarten\VisitenkartenUebersicht\DialogLoescheVisitenkarte\VisitenkarteLoeschen;

class LoescheVisitenkarteController extends \Kufer\KuferTools\Basis\Controller\ToolController
{
  protected function getUseCase()
  {
    return new LoescheVisitenkarteUseCase($this->getRequestObj());
  }

  protected function getToolId()
  {
    return LoescheVisitenkarteUseCase::getToolId();
  }

  public function getPresenter($pUseCaseResponse)
  {
    return null;
  }

  protected function getControllerToForward($pUseCaseResponse)
  {
    return new \Kufer\KuferTools\Teilnehmer\Visitenkarten\VisitenkartenUebersicht\NachLoescheVisitenkarteController($pUseCaseResponse->statusCode);
  }

  protected function getRequestObj()
  {
    $requestObj = new LoescheVisitenkarteRequest();
    $requestObj->visitenkarteId = \GetOperations::getVarValue('karteID');

    
    $action = $this->getActionVal();

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