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

namespace Kufer\KuferTools\Utils\WssField;

class WssFieldKursNummerAb extends 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);
  }
}