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

namespace Kufer\Web\KuferTools\Firma\KursUebersicht\Detailsreiter\Downloads;

use Kufer\Web\KuferTools\Basis\Kursdetails\Detailsreiter\Downloads\DownloadsRequest;

class DownloadsController extends \Kufer\Web\KuferTools\Basis\Kursdetails\Detailsreiter\Downloads\DownloadsController
{
  protected function getUseCase(): \Kufer\Web\KuferTools\Basis\UseCase\UseCase
  {
    return new DownloadsUseCase(
      $this->getRequestObj()
    );
  }

  protected function createNewRequestObj(): DownloadsRequest
  {
    return new \Kufer\Web\KuferTools\Firma\KursUebersicht\Detailsreiter\Downloads\DownloadsRequest();
  }

  protected function getRequestObj()
  {
    $request = parent::getRequestObj();
    $request->belegId = \GetOperations::getVarValue('belid');

    return $request;
  }
}