<?php

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

namespace Kufer\Web\KuferTools\Teilnehmer\Visitenkarten\VisitenkartenDetails;

class VisitenkartenDetailsView extends \Kufer\KuferTools\Basis\View\ViewSight
{
  public function getTemplatePathRelative()
  {
    return 'teilnehmer/visitenkarten/visitenkartendetails.sgt';
  }

  protected function getDefaultDataModulArray()
  {
    $datamodul = new class() extends \Datamodul {
      public $ueberschrift;
      public $buttons;
      public $visitenkarteId;
      public $successMeldung;
      public $infoMeldung;
    };
    $datamodul->ueberschrift = $this->viewModel->ueberschrift;
    $datamodul->buttons = $this->viewModel->buttons;
    $datamodul->visitenkarteId = $this->viewModel->visitenkarte->id;
    $datamodul->successMeldung = $this->viewModel->successMeldung;
    $datamodul->infoMeldung = $this->viewModel->infoMeldung;

    return array($datamodul);
  }

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

  protected function getBodyExportAdapter()
  {
    return new \ExpColumn($this->viewModel->visitenkarte, true);
  }
}

class VisitenkartenDetailsViewModel
{
  public $ueberschrift;
  public $visitenkarte;
  public $columns;
  public $buttons;
  public $successMeldung;
  public $infoMeldung;
}