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

namespace Kufer\KuferTools\Dozent\Portrait\Dozentenportrait;

class DozentenPortraitView extends \Kufer\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->dozentenPortrait);
  }
}

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