<?php
/**
 * @copyright (c) Kufer Software GmbH, Oderstraße 7, D-84453 Mühldorf
 */

class ComboboxKirchengemeinde extends Combobox
{
  protected function getDatamodulAry(): array
  {
    $dbw = new DBWorkHLKirchengemeinde(1, true);

    return $dbw->getAll();
  }

  protected function getValueFieldName(): string
  {
    return 'kirchengemeinde';
  }

  protected function getTextFieldName(): string
  {
    return 'kirchengemeinde';
  }

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

    return $option;
  }
}