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

namespace Kufer\Web\KuferTools\Ausgaben\SammelEMail\AnDozenten;

use Kufer\Web\Classes\ExportAdapter\ExpAdditionalVariables;

class SammelEMailView extends \Kufer\Web\KuferTools\Ausgaben\SammelEMail\SammelEMailView
{
  public function getTemplatePathRelative()
  {
    
    
    return 'basis/kursdetails/detailsreiter/sammelemail_dozent.sgt';
  }

  protected function getBodyDataModulArray()
  {
    return $this->viewModel->dozenten;
  }

  protected function getBodyExportAdapter()
  {
    return new ExpAdditionalVariables(
      new \ExportDozenten(),
      array('showEMail' => $this->viewModel->showEMail ?? false)
    );
  }

  protected function getFooterDataModulArray()
  {
    $this->viewModel->kurs->sendTnPDFListe = $this->viewModel->sendTnPDFListe;

    return array($this->viewModel->kurs);
  }

  protected function getHeaderDataModulArray()
  {
    $result = parent::getHeaderDataModulArray()[0];
    $result->saveDozenten = $this->viewModel->saveDozenten;

    return array($result);
  }
}

class SammelEMailViewModel
{
  public $dozenten;
  public $countDozenten;
  public $kurs;
  public $sendTnPDFListe;
  public $emailInhalt;
  public $saveDozenten;
  public $showEMail;
}