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

class ComboboxSemester extends Combobox
{
  protected function getDatamodulAry()
  {
    $dbwSemester = new DBWorkHLSemester(1, true);

    return $dbwSemester->getAll();
  }

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

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

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

    return $option;
  }
}