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

namespace Kufer\KuferTools\Dozent\Lehrplan\Lehrplan;

class LehrplanController extends \Kufer\KuferTools\Basis\Uebersicht\UebersichtController
{
  protected function getUseCase(): \Kufer\KuferTools\Basis\UseCase\UseCase
  {
    return new LehrplanUseCase(
      $this->getRequestObj()
    );
  }

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

  protected function getDefaultRequestObj()
  {
    $request = new LehrplanRequest();
    $request->filter_datum_von = \GetOperations::getVarValue('datVon');
    $request->filter_datum_bis = \GetOperations::getVarValue('datBis');

    return $request;
  }

  protected function getSuchAPI()
  {
    return new \LehrplanSucheAPI();
  }

  protected function getRequestSearchName()
  {
    return 'searchkurs';
  }

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