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

namespace Kufer\Web\KuferTools\Basis\Kursdetails\Detailsreiter\Termine\TerminVerlaengernDialog\Wunsch;

abstract class TerminVerlaengernAbsendenEMailPresenter extends \Kufer\Web\KuferTools\Basis\Presenter\Presenter
{
  protected $view;

  public function present()
  {
    $view = $this->getView();

    return $view->getHeader() . $view->getBody() . $view->getFooter();
  }

  
  public function getBetreff()
  {
    return $this->getView()->getNoData();
  }

  abstract protected function createView();

  
  protected function getView()
  {
    $this->view = $this->view ?? $this->createView();

    return $this->view;
  }

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

  protected function getViewModel()
  {
    $viewModel = $this->getNewViewModel();
    $viewModel->kurs = $this->useCaseResponse->kurs;
    $viewModel->toolId = $this->useCaseResponse->toolId;

    return $viewModel;
  }
}