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

namespace Kufer\KuferTools\Veranstalter\KursUebersichtAndererVeranstalter\SortierenDialog;

class SortierenDialogController extends \Kufer\KuferTools\Basis\Controller\AjaxToolController
{
  protected function getUseCase(): \Kufer\KuferTools\Basis\UseCase\UseCase
  {
    return new SortierenDialogUseCase(
      $this->getRequestObj()
    );
  }

  protected function getRequestObj()
  {
    $requestObj = new SortierenDialogRequest();
    $requestObj->sortOrderValue1 = \SessionOperations::getVarValueWTIntern('sortKurse_kr1_' . SortierenDialogUseCase::getToolId());
    $requestObj->sortOrderValue2 = \SessionOperations::getVarValueWTIntern('sortKurse_kr2_' . SortierenDialogUseCase::getToolId());

    return $requestObj;
  }

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