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


namespace Kufer\Web\KuferTools\Veranstalter\KursUebersicht\Detailsreiter\Downloads\BearbeiteDoku;

use Kufer\Web\KuferTools\Utils\Download\DokuHelper as DokuHelper;

class BearbeiteDokuSubmitController extends \Kufer\Web\KuferTools\Basis\Controller\ToolController
{
  
  protected $dokuHelper;

  public function __construct()
  {
    $this->dokuHelper = new DokuHelper();
  }

  protected function getUseCase(): \Kufer\Web\KuferTools\Basis\UseCase\UseCase
  {
    return new BearbeiteDokuSubmitUseCase(
      $this->getRequestObj(),
      $this->dokuHelper
    );
  }

  protected function getRequestObj()
  {
    $requestObj = $this->dokuHelper->getCommonRequestPart();
    $requestObj->knr = \RequestOperations::getVarValue('knr');
    $requestObj->dokuId = \RequestOperations::getVarValue('dokumentId');

    
    $action = \GetOperations::getVarValue('action');
    
    return $this->handleXsrf($requestObj, $action, $requestObj->dokuId);
  }

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

  
  protected function getControllerToForward($pUseCaseResponse)
  {
    
    $statusMessageContainer = $pUseCaseResponse->statusMessageContainer;

    return new \Kufer\Web\KuferTools\Veranstalter\KursUebersicht\KursDetails\KursDetailsExternController($statusMessageContainer);

    
    
    
  }
}