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

namespace Kufer\Web\KuferTools\Utils\WssField\Kurs;

class WssFieldKursNummer extends \Kufer\Web\KuferTools\Utils\WssField\WssField
{
  protected function getValue($dataModulWert, $isFormular = false)
  {
    
    
    $knr = $dataModulWert->getVarValueEx('nr_anzeige', 'kurs');
    if (isset($dataModulWert->urlZuKursDetails)) {
      return '<a class="kursdetailslink" href="' . $dataModulWert->urlZuKursDetails . '">' . $knr . '</a>';
    }

    return $knr;
  }

  protected function encodeValue($value)
  {
    return $this->purifyHtml($value);
  }
}