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

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

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

    return $knr;
  }

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