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

namespace Kufer\Web\KuferTools\Dozent\Lehrplan\Lehrplan;


class KursTagView extends \Kufer\Web\KuferTools\Basis\View\ViewSight
{
  public function getTemplatePathRelative()
  {
    return 'dozent/lehrplan/kurstag.sgt';
  }

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

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

  protected function getDefaultDataModulArray()
  {
    $this->viewModel->kurstag->show_kursdetails_link = $this->viewModel->showKursdetailsLink;

    return array($this->viewModel->index => $this->viewModel->kurstag);
  }

  protected function getDefaultExportAdapter()
  {
    return new \ExpKurstage(true);
  }
}

class KursTagViewModel
{
  public $kurstag;
  public $columns;
  public $index;
  public $showKursdetailsLink;
  public $toolSection;
  public $toolSettings;
}