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

namespace Kufer\Web\KuferTools\Dozent\Urlaube\Uebersicht\Filter;

use Kufer\KuferTools\Basis\View\BasisViewModel;

class UrlaubeShowFilterView extends \Kufer\KuferTools\Basis\View\ViewSight
{
  public function getTemplatePathRelative()
  {
    return 'dozent/urlaube/filter.sgt';
  }

  protected function getDefaultDataModulArray()
  {
    $result = new class() extends \Datamodul {
      public $toolId;
      public $datumVon;
      public $datumBis;
      public $grund;
    };

    foreach (array_keys(get_object_vars($this->viewModel)) as $key) {
      $result->{$key} = $this->viewModel->{$key};
    }

    return array($result);
  }
}

class UrlaubeShowFilterViewModel extends BasisViewModel
{
  public $toolId;
  public $datumVon;
  public $datumBis;
  public $grund;
}