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

class ComboboxVeranstaltungsart extends Combobox
{
  protected function getDatamodulAry()
  {
    $db = new DBWorkVeranstaltungsart(1, true);
    $db->orderby = 'text ASC';

    return $db->getVeranstaltungsarten();
  }

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

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

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

    return $option;
  }
}