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

class ComboboxUeGehalten extends Combobox
{
  protected function getDatamodulAry()
  {
    $vereinbarterUmfang = new class() extends Datamodul {
      public $value;
      public $text;
    };
    $vereinbarterUmfang->value = 1;
    $vereinbarterUmfang->text = 'im vereinbarten Umfang';

    $anders = new class() extends Datamodul {
      public $value;
      public $text;
    };
    $anders->value = 2;
    $anders->text = 'anders';

    return array(
          $vereinbarterUmfang,
          $anders);
  }

  protected function getValueFieldName()
  {
    return 'value';
  }

  
  protected function getTextFieldName()
  {
    return 'text';
  }

  protected function getDefaultOption()
  {
    $option = new ComboboxOption();
    $option->value = 0;
    $option->text = '--Bitte auswählen--';
    $option->isSelected = is_null($this->selectedValue);

    return $option;
  }
}