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

 

  




  class FormVarRadio extends FormVar
  {
    
    public $formoptval;
    
    public $formoptkey;
    
    
    public $formvarhlp;

    
    public function __construct(
      $formvarna,
      $formname,
      $formtext,
      $formoptary = null,
      $formopt0txt = '',
      $formgrptxt = '',
      $formoptval = '',
      $formoptkey = '',
      $formvarhlp = null
    ) {
      
      parent::__construct($formvarna, $formname, $formtext, $formoptary, $formopt0txt, $formgrptxt);
      $this->formoptval = $formoptval;
      $this->formoptkey = $formoptkey;
      $this->formvarhlp = $formvarhlp;
    }

    
    public function getFormElem($formcheck)
    {
      return "<td class='formelemradio'>" . $this->getRadioButton($formcheck) . "</td>\n";
    }

    
    public function getRadioButton($formcheck)
    {
      return " <input type='radio' value='" . CleanOperations::cleanStringForHtml($this->formoptval) . "' " . CleanOperations::cleanStringForHtml($formcheck)
                          . " name='" . CleanOperations::cleanStringForHtml($this->formname) . "'><font class='text_main_menu'>"
                          . CleanOperations::cleanStringForHtml($this->formtext) . '&nbsp;&nbsp;</font>';
    }
  }