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

namespace Kufer\KuferTools\Basis\KursUebersicht;

abstract class KursView extends \Kufer\KuferTools\Basis\View\ViewSight
{
  
  protected function getBodyDataModulArray()
  {
    return $this->viewModel->columns;
  }
  
  protected function getBodyExportAdapter()
  {
    return new \ExpColumn($this->viewModel->kurs);
  }
  
  protected function getDefaultExportAdaper()
  {
    return new \ExpKurse(true);
  }
  
  protected function getDefaultDataModulArray() {
    $this->viewModel->kurs->showCheckbox = $this->viewModel->showCheckbox;
    $this->viewModel->kurs->linkZuKursdetails = $this->viewModel->linkZuKursdetails;
    $this->viewModel->kurs->buttons = $this->viewModel->buttons;
    return array($this->viewModel->index => $this->viewModel->kurs);
  }
}

class KursViewModel
{
  public $kurs;
  public $columns;
  public $index;
  public $showCheckbox;
  public $linkZuKursdetails;
  public $buttons;
}