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

namespace Kufer\KuferTools\Basis\Anmeldung\TnUebersichtDialog;

abstract class TnUebersichtDialogView extends \Kufer\KuferTools\Basis\View\ViewSight
{
  protected function getDefaultDataModulArray()
  {
    $dm = new class() extends \Datamodul {
      public $className;
      public $columnsCount;
      public $showAdvancedFilter;
    };
    $dm->className = $this->viewModel->className;
    $dm->columnsCount = \count($this->viewModel->columns);
    $dm->showAdvancedFilter = $this->viewModel->showAdvancedFilter;

    return array($dm);
  }

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

  protected function getBodyExportAdapter()
  {
    return new \ExpColumn(null, true);
  }
}

class TnUebersichtDialogViewModel extends \Kufer\KuferTools\Basis\View\BasisViewModel
{
  public $className;
  public $columns;
  public $showAdvancedFilter;
}