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

namespace Kufer\KuferTools\Basis\Kursdetails\DetailsReiter\Termine\ShowFilterTermine;

class ShowFilterTerminePresenter extends \Kufer\KuferTools\Basis\Presenter\Presenter
{
  protected function getView()
  {
    return new ShowFilterTermineView($this->getViewModel());
  }

  protected function getNewViewModel()
  {
    return new ShowFilterTermineViewModel();
  }

  protected function getViewModel()
  {
    $viewModel = $this->getNewViewModel();
    $viewModel->knr = $this->useCaseResponse->knr;
    $viewModel->belegId = isset($this->useCaseResponse->belegId) ? '&belid=' . $this->useCaseResponse->belegId : '';
    $viewModel->showTermineDatum = $this->useCaseResponse->showTermineDatum;
    $viewModel->showTermineUhrzeit = $this->useCaseResponse->showTermineUhrzeit;
    $viewModel->showTermineDozent = $this->useCaseResponse->showTermineDozent;
    $viewModel->termineDozentEigeneChecked = $this->useCaseResponse->termineDozentEigeneChecked ? ' checked="checked" ' : '';
    $viewModel->termineDozentChecked = $this->useCaseResponse->termineDozentChecked ? ' checked="checked" ' : '';

    $viewModel->showTermineDozRadioButtons = $this->useCaseResponse->showTermineDozRadioButtons;
    $viewModel->showTermineOrt = $this->useCaseResponse->showTermineOrt;
    $viewModel->showTermineBemerkung = $this->useCaseResponse->showTermineBemerkung;
    $viewModel->showTermineStatus = $this->useCaseResponse->showTermineStatus;
    $viewModel->toolId = $this->useCaseResponse->toolId;

    return $viewModel;
  }
}