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

namespace Kufer\Web\KuferTools\Basis\TeilnehmerInfo\SammelEMail;

use Kufer\Web\Classes\ExportAdapter\ExpAdditionalVariables;

abstract class SammelEMailView extends \Kufer\Web\KuferTools\Basis\View\ViewSight
{
  protected function getBodyDataModulArray()
  {
    return $this->viewModel->teilnehmer;
  }

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

  protected function getDefaultDataModulArray()
  {
    $datamodul = new \Datamodul();
    $datamodul->backLink = $this->viewModel->backLink;
    $datamodul->backButtonLabel = $this->viewModel->backButtonLabel;
    $datamodul->errorMessage = $this->viewModel->errorMessage;
    $datamodul->toolId = $this->viewModel->toolId;

    return array($datamodul);
  }
}

class SammelEMailViewModel
{
  public $teilnehmer;
  public $toolId;
  public $errorMessage;

  public $backLink;
  public $backButtonLabel;
  public $showEMail;
}