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

class ComboboxGeschlecht extends Combobox
{
  protected function getDatamodulAry()
  {
    $dbwGeschlecht = new DBWorkGeschlecht(1, true);

    return $dbwGeschlecht->getGeschlechter();
  }

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

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

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

    return $option;
  }
}