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

namespace Kufer\Web\KuferTools\Dozent\Portrait\Dozentenportrait;

class DozentenPortraitView extends \Kufer\Web\KuferTools\Basis\View\ViewSight
{
  public function getTemplatePathRelative()
  {
    return 'dozent/portrait/dozentenportrait.sgt';
  }

  protected function getHeaderDataModulArray()
  {
    $dm = new \Datamodul();
    $dm->status_erfolgreich = $this->viewModel->messageSuccess;
    $dm->status_info = $this->viewModel->messageInfo;
    $dm->status_fehler = $this->viewModel->messageError;

    return array($dm);
  }

  protected function getDefaultDataModulArray()
  {
    return array($this->viewModel->dozentenPortrait);
  }

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

  protected function getBodyExportAdapter()
  {
    return new \ExpColumn(
      $this->viewModel->toolSection,
      $this->viewModel->toolSettings,
      $this->viewModel->dozentenPortrait
    );
  }
}

class DozentenPortraitViewModel
{
  public $dozentenPortrait;
  public $columns;
  public $messageSuccess;
  public $messageInfo;
  public $messageError;
  public $messageWarning;
  public $toolSection;
  public $toolSettings;
}