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


class ComboboxKursOnlineSoftware extends Combobox
{
  
  public function __construct($datamodul)
  {
    parent::__construct($datamodul->getVarValueEx('webinar_softwareid', 'kurs2'));
  }

  protected function getDatamodulAry(): array
  {
    $dbwSoftware = \DBWorkHLWebinarSoftware::getDefaultInstance();

    return $dbwSoftware->getAll();
  }

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

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

  protected function getDefaultOption(): ?\ComboboxOption
  {
    $option = parent::getDefaultOption();
    
    
    $option->text = 'Keine Software';

    return $option;
  }
}